Load file

From: Date: Thu, 15 Mar 2001 06:16:54 +0000
Subject: Load file
Groups: php.db 
Request: Send a blank email to php-db+get-7502@lists.php.net to get a copy of this message
I'm trying to read a text file into a blob field in a database with the following code: $cvfile="xxxx.txt"; $exist = file_exists($cvfile); echo "File exists $exist<BR>"; $result1=mysql_query("select * from $TA"); $rows=mysql_num_rows($result1); echo "$rows<BR>"; $result=mysql_query("update $TA set P1description = load_file($cvfile)") or die (mysql_error()); Output shows File exists 1 (which I assume menas True) and the table is being read because $rows equals 2. P1 Then I get the "You have an error in your SQL syntax near '(xxxx.txt)' at line 1" error Any help? Regards Mick Lloyd mjl@consultingrooms.com Tel: +44 (0)1684 560224

« previous php.db (#7502) next »