LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: Philip Thompson Date: Sun Apr 27 12:09:17 2008 Subject: Re: playing longblob media
On Apr 27, 2008, at 9:15 AM, Ron wrote: > Hi, > > How can i retrieve via php a media stored in a mysql database as > longblob? > > I'd like to be able to retrieve the media and stream it. > > TIA > > regards, > ron Just like any other field type. Doesn't matter to PHP what the field type is... <?php $sql = "SELECT `longblob_fieldname` FROM `table` WHERE (`id` = '$id') LIMIT 1"; $result = mysql_query ($sql); if (mysql_num_rows ($result)) { $contents = mysql_result ($result, 0); } ?> ~Philip
| Navigate in group php.db at sever news.php.net | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by Zareef Ahmed
Powered By PHP Consultants |