in reply to Re: load_file and mysql
in thread load_file and mysql

Hi Ryszard,
I changed (on popular demand :-) ) the code to:
foreach ( readdir DIR ) { next if /^\.{1,2}$/; my $file=$dir."/".$_; my $query; my $h; $file=$o->quote($file); $query='insert into search ( title ) values ( ? )'; $h=$o->prepare($query); print "$query: ",$h->execute($file),"\n"; print $h->errstr() if $h->err(); $query='update search set body=LOAD_FILE(?) where title = ? ' ; $h=$o->prepare($query); print "$query: ",$h->execute($file),"\n"; print $h->errstr() if $h->err(); } closedir(DIR);
and the problem remains.
ps: If I remove LOAD_FILE and just insert ? (placeholder), it works fine. I guess DBI has a problem with the LOAD_FILE part.
---------------------------
Dr. Mark Ceulemans
Senior Consultant
IT Masters, Belgium