Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 12th, 2004, 05:56 PM
jfranz jfranz is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 11 jfranz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 47 m 43 sec
Reputation Power: 0
Viewing jpg's with PHP

I am trying to connect to Oracle 9i db and query for a jpeg. I keep on recieving a windows download popup after executing the webpage. I have enclosed the code. The sql is correct. Dont know what else is wrong. PHP and GD is setup correctly. I can view jpegs through php with a flat file used for storage. Thanks.
<?php
$username = "xxxxxxxx";
$passwd = "xxxxxxxxx";
$db="xxxxxxxxxx";

$conn = OCILogon($username,$passwd,$db);
if (!$conn) {
echo "Connection failed";
echo "Error Message: [" . OCIError($conn) . "]";
exit;
}
else
{
echo "Successfully Connected to Database!\n\n";
}
;
$conn = OCILogon($user, $password,$db );
$query = "select dbd_image from database where patronid ='11111111'";
$stmt = OCIParse($conn, $query);
$err = OCIExecute($stmt);

OCIFetchInto($stmt);

header('Content-Type: image/jpg');
print $stmt;

ocilogoff($conn);

?>

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Viewing jpg's with PHP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway