Re: PHP and Images stored in mysql
| From: | Bogdan Stancescu | Date: | Wed, 09 Jan 2002 23:16:03 +0000 |
| Subject: | Re: PHP and Images stored in mysql | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-79972@lists.php.net to get a copy of this message | ||
My way around this is using two fallback stages: for one you test
mysql_num_rows() after performing the query. If that's 0, use a default image
placed in the database beforehand. If that also returns a null mysql_num_rows()
then echo an image (probably the same default) from a known location in the
filesystem.
HTH
Bogdan
Rodrigo Peres wrote:
> Hi list,
>
> I have some images stored in a blob in mysql. I've made this code to output
> them to html, but the problem is if there's no image at a given id the page
> tooks a long time to load and display the "broken image", there's a way to
> avoid this, I mean, there's a way to print a message or another image if
> there's none in mysql ???