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 ???

<?
    $sql = "SELECT Imagem_data,Imagem_type FROM imagens WHERE
CelebID='$celebID'";
    $query = new Query($conexao);
    $query->executa($sql);
    $resultado = $query->dados();
    mysql_close();
    
    $imagem_banco = $resultado['Imagem_data'];
    $type = $resultado['Imagem_type'];
    if($imagem_banco != "") {
        HEADER("Content-type: $type");
        echo($imagem_banco);
    }
}
?>

Thank's in advance

Rodrigo
-- 



-- 
PHP General 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