I have done some googling and have failed miserably to find an answer to this...
Is it possible stream read/write some binary data from the local FS into a MySQL blob field using Zend Framework's Table/Row gateway classes?
Use Case (slightly contrived I know):
I have on my local FS a 100MB file and wish to store this in a DB (eeekk!). At the moment I'm forced to read this entire file into PHP's memory and then assign it to a Zend_Db_Table_Row_Abstract object before I can save the record to mysql. Is there anyway to assign the a stream to the row object so when I can save the row it just streams from the FS thus massively reducing memory consumption? (and I'd like to the opposite for reading from the DB)
Note: DB server and PHP server run on separate hardware/instances..
Apologies if I have missed some easy way to this or I am asking the impossible, it's just I seem to remember doing this with PostgreSQL and ZF easily enough.
LOAD_FILE()MySQL function. For writing to file there isSELECT ... INTO OUTFILEalthough I am not sure how this works in terms of reproducing the exact file as I have never used it.