On 15 Jul 2009, at 06:32, jigen7 wrote:
>
> Hello, how can i store image in a database preferably in Posgre using
> zend?thanks
You will need to define a binary column in your table (called BLOBs in
MySQL, dunno about others). Then you can simply get the contents of
the file into a PHP string and write it to the database like any other
value.
However, you will potentially reduce the performance of your database,
and you should probably consider writing the files to disk and just
storing the reference and meta-data in the database.
Regards
Paul
没有评论:
发表评论