faqts : Computers : Programming : Languages : PHP : Database Backed Sites : General : BLOBs (Binary Large Objects)

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

527 of 558 people (94%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

Why wont the insert work when I try and insert an image into a database?
Why can't I insert binary data into my database?

Mar 19th, 2000 19:59
Dave Garth, Onno Benschop,


It is because quotes and backslashes exist in the data. you need to use 
the function addslashes to backslash any data that needs it. $foo = 
addslashes($foo