Changeset 21872

Show
Ignore:
Timestamp:
12.04.2010 17:45:35 (9 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.

Files:
1 modified

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 |"))