On 02/gen/06, at 16:34, Dennis Boone wrote:
I am trying to clean up a raw MARC record for insertion in a MySQL
database. Here is my code:
$rec = $rec->rawdata();
$rec = $dbh->quote($rec);
I get the following error back:
DBD::mysql::st execute failed: 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 '02852cam 2200325Ia
45e0001000800000005001700008008004100025010 at ./zlite.pl line 73,
<STDIN> line 3.
Unless the quote() call is the one producing this error, it would
help to see the actual SQL statement and the prepare and execute
calls, as well as the field definitions.
The error seems produced by the execute statement, not the quote one.
Anyway, trying to insert binary data in PostgreSQL's fields of type
text or varchar causes the same error. This is another reason why
yesterday I suggested to use blob.
SB