are you null terminating the string?
Andrei Cojocaru
[EMAIL PROTECTED]
- Original Message -
From: Sameer Maggon [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 7:51 AM
Subject: Binary Data mysql_real_escape_
Hi,
Please see the code given below::
//
strcpy(query,INSERT INTO blobtest VALUES('abc',');
qptr = query;
len = strlen(query);
qptr += len;
qptr += mysql_real_escape_string(mysql, qptr, data, iBytesRead);
*qptr += '\'';
*qptr += ')';
mysql_real_query(mysql,query, (unsigned int)( qptr - query));
printf(error = %s, mysql_error(mysql));
//
It gives the error
error = You have an error in your SQL syntax
near ''ÿØÿà\0^PJFIF\0^A^A\0\0^
A\0^A\0\0ÿÛ\0C\0^H^F^F^G^F^E^H^G^G^G
^H\n^L^T\r^L^K^K^L^Y^R^S^O^T^]\Z^_^^^]\Z^\^\ $.\' \'
at line 1
HWhat might be the problem
Please help
Sameer
--
http://www.dypatil.edu For Better tomorrow
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php