I have a strange problem and was wondering if anyone had an idea of what
was going on.

I have a php script that displays images I place in a database. The reason
I place the images in a database is because it simplifies things and the
performance of the database itself is not an issue for this project. But
anyway, I retrieve the image and everything goes fine. But the next time I
try to retrieve it, nothing happens. The page just loads and loads
indefinetly. Here's my code (that works.. but only once a day though :/ )

<?
     require_once("db_lin.php");

     if (!$conn = db_connect())
     {
          echo "can't connect to database";
          return;
     }
     $get_image_result = mysql_query("select image from images where
directory = '$fp' ");

     $myImage = @mysql_result($get_image_result, 0, "images") OR die
("database error");


     Header("Content-Type: image/png");
     echo ($myImage);

     mysql_close();
?>

my guess is that there's just something wrong with the database or
something (the database is on the same machine as the script). but if
anyone has any ideas about how to solve this I'd appreciate it.

-petur


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to