php-src/tests/odbc-display.php

20 lines
423 B
PHP
Raw Normal View History

2000-05-28 12:50:19 +00:00
<?php
if(($conn = odbc_connect($dsn, $dbuser, $dbpwd))){
if(($res = odbc_do($conn, "select gif from php_test where id='$id'"))){
odbc_binmode($res, 0);
odbc_longreadlen($res, 0);
if(odbc_fetch_row($res)){
header("content-type: image/gif");
odbc_result($res, 1);
exit;
}else{
echo "Error in odbc_fetch_row";
}
} else {
echo "Error in odbc_do";
}
} else {
echo "Error in odbc_connect";
}
?>