DB-stored images

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Title: DB-stored images

Hi!

I have a db where we stores images in the database but I haven't figured out how I display
that image after I've selected it from the table.

I've tried with <IMG SRC=''> and <IMG SRC=""> but $data just return the Select-query:
<html><head><title></title></head>
<body bgcolor=cccccc text=000000 link=0000ff vlink=0000ff>
<B>Picture</B><BR><UL>
<IMG SRC=''91-29-65480-7''>
</UL></body></html>

Anyone have an idea what I can do?
Thanks!

Here is the script:
=====================================================
<?
$handle = ORA_LOGON("something/something","") OR DIE("Unable to connect to database");

print "<html><head><title></title></head>\n";
print "<body bgcolor=cccccc text=000000 link=0000ff vlink=0000ff>\n";

if ($type == Author){
  $SqlStatement = "SELECT ...";
} else if ($type == Titel){
  $SqlStatement = "SELECT ...";
} else if ($type == Picture) {
  $SqlStatement = "SELECT PICTURE FROM KATALOGUE WHERE ISBN = '$isbn'";
}
$csr = ORA_OPEN($handle) OR DIE("Unable to open data database cursor");
ORA_PARSE($csr, $SqlStatement)OR DIE("Unable to parse query");
ORA_EXEC($csr) OR DIE("Unable to run query");

print "<B>$type</B><BR><UL>\n";
while(ORA_FETCH($csr)){
  $data = "">
  if ($type == Picture){
    print "<IMG SRC=''>\n";
  } else {
    print "<LI>$data</LI>\n";
  }
}

print "</UL></body></html>\n";

ORA_CLOSE($csr);
ORA_LOGOFF($handle);
?>

//Stefan

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux