I've got a temporary database with a blob column. I'm using the PHP PDO
interface, and I'd like to store some binary data into the blob; it's actually
an image. Later I'm going to read it back and write it to disk. What's the
right way to get the data into the column? At the moment I'm using
Tim Streater wrote:
I've got a temporary database with a blob column. I'm using the PHP
PDO interface, and I'd like to store some binary data into the blob;
it's actually an image.
At the moment I'm using str_replace to change any single-quote to two
single-quotes, and then doing as follows:
On 3 Oct 2012, at 9:33am, Tim Streater t...@clothears.org.uk wrote:
I've got a temporary database with a blob column. I'm using the PHP PDO
interface, and I'd like to store some binary data into the blob; it's
actually an image. Later I'm going to read it back and write it to disk.
What's
On 03 Oct 2012 at 10:50, Clemens Ladisch clem...@ladisch.de wrote:
Tim Streater wrote:
What's the right way to get the data into the column?
1) Use SQLite blob literals, which are hex strings with an x prefix:
... set imagedata = x'ffd8ffe000104a46...' where ...
2) Use parameters