insert error for mysql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi!

I have an error message to try to insert character into table.
But I have an error messages like below. When I try to insert
$strbuf, I got error.


Could not perform INSERT to table 1064: You have an error in your SQL
syntax. Check the manual that corresponds to your MySQL server version
for the right syntax to use near 's used in the retail, banking, and
insurance industries, among



I publish SQL;

mysql> create table view(b_col_id mediumint(255) NOT NULL
AUTO_INCREMENT, b_col longblob NOT NULL,file_name varchar(255) NOT
NULL,file_size varchar(255) NOT NULL,file_type varchar(255) NOT
NULL,file_date time,vtext longtext,PRIMARY KEY(b_col_id))TYPE=MyISAM;


mysql> alter tablev view add fulltext (vtext);

The code----------------------------------------------
$handle = popen("/usr/bin/pdftotext \"$original_tmp\" - -layout  2>&1",
'r');
$strbuf = fread($handle, 2048000);
echo $strbuf;

pclose($handle);


$sql_insert = "INSERT INTO
view(b_col,file_name,file_size,file_type,file_date,vtext) VALUES
('$binaryContent','$original_name','$original_size','$original_type',CURTIME(),'$strbuf')";

mysql_query($sql_insert) or DIE ("Could not perform INSERT to table
".mysql_errno().": ".mysql_error());
mysql_close($db);






Please do help me!

Yui

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux