views:

427

answers:

2

I've got a raw/(binary?) image like this:

ÿØÿà�JFIF��–�–�*!!!$'$ &(goes on forever);

when i try to insert this into mysql it doesn't work, the column type is set to longblob, any ideas?

+2  A: 

I think you need to escape that using mysql_real_escape_string before inserting into the database.

karim79
thanks, works great!
John
A: 

mysql_real_escape_string for php_mysql mysqli_real_escape_string or prepare statement for php_mysqli