The tutorials online about inserting images and other binary data into a database have you put it in a character buffer and use mysql_real_escape_string() on it. The thing is, characters are 1 byte. I have 2-byte numbers, a huge array of them, that I need to insert into a database blob. I tried looping through and doing an UPDATE for each unsigned 16-bit number, to append it to the blob, but of course that was very, very slow.
How can I do this efficiently?
Aucun commentaire:
Enregistrer un commentaire