How to write the query to insert a picture to mysql data field which is declared as BLOB.

I would like to knw the pure sql query with out any involvement of a programing language.(If there is such)

Thankx in advance.

INSERT INTO PICTABLE (MYID, PIC) VALUES (3, LOAD_FILE('/PHP/ME.JPG'));

watch out for the slashes though i can't remember if it's correct the way i have on top or if you have to use the double slash (//) or the single backward slash(\)

also it would be better to have the full pathname instead.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.