Changeset 21872


Ignore:
Timestamp:
2010-04-12T17:45:35+12:00 (11 years ago)
Author:
davidb
Message:

sqlite3 can take an sql statement as an extra parameter. Better to do this than use echo and pipe it through, as more cross-platform independent.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/dbutil/sqlite.pm

    r21856 r21872  
    8181  my $sqlite3_exe = &util::filename_cat($ENV{'GSDLHOME'},"bin",$ENV{'GSDLOS'}, "sqlite3" . &util::get_os_exe());
    8282  my $infodb_handle = undef;
    83   my $cmd = "echo \"$sqlcmd\" | \"$sqlite3_exe\" \"$infodb_file_path\"";
     83  my $cmd = "\"$sqlite3_exe\" \"$infodb_file_path\" \"$sqlcmd\"";
    8484
    8585  if (!-e "$sqlite3_exe" || !open($infodb_handle, "$cmd |"))
Note: See TracChangeset for help on using the changeset viewer.