Re: [PHP] PHP and Images stored in mysql

2002-01-10 Thread Rodrigo Peres
How can I echo an image from other location than the mysql using this kind of script?? since I'm using php to output the image from database, there's a way to change it to a ftp link for example if image doesn't exists?? this is my script: ? $sql = SELECT Imagem_data,Imagem_type FROM

[PHP] PHP and Images stored in mysql

2002-01-09 Thread Rodrigo Peres
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

Re: [PHP] PHP and Images stored in mysql

2002-01-09 Thread Bogdan Stancescu
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