Re: playing longblob media
| From: | Philip Thompson | Date: | Sun, 27 Apr 2008 18:09:17 +0000 |
| Subject: | Re: playing longblob media | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-44908@lists.php.net to get a copy of this message | ||
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, ronJust 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