Bluehost.com Web Hosting $6.95

PHP+MSSQL

This is a discussion on PHP+MSSQL within the PHP Language forums, part of the PHP Programming Forums category; I am having the same problem with printing images via php from mssql. I am not able to print out ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 12-13-2004
hipnautic@gmail.com
 
Posts: n/a
Default Re: PHP+MSSQL

I am having the same problem with printing images via php from mssql.
I am not able to print out the image from the mssql database via php,
but the other "text" data returns normally. Here's the part of the
code that prints the image correctly via a php-mysql relationship but
won't work correctly in php-mssql:

<?

include("databaseAccess.php");
$Link = odbc_connect($DSN, $User, $Password);

$SqlQuery = "SELECT * FROM uml WHERE ID=".$_GET["iid"];
$QueryResult = odbc_do ($Link, $SqlQuery);

if (odbc_num_rows($QueryResult)>0)
{
$Row = @odbc_fetch_array ($QueryResult);
$image_type = $Row["Type"];
$image = $Row["Image"];
Header ("Content-type: $image_type");
print $image;
}
?>

Any help would be appreciated! Thanks!
?>



> Image = Blob in Microsoft-speak. There's nothing special about it.

Just a
> blob of binary data.
>
> I don't know what you mean by 'file size in php.ini'. The settings

that you
> need to change are mssql.textsize and mssql.textlimit.
>
> Again, PHP has no problem dealing if blobs from MS SQLServer. All you

have
> to do is select the column. You might need to place the blob column

last.
> Other than that it doesn't behave differently from other columns.
>
> Post the actual code if you're still having problem. Kinda hard to

guess at
> what you're actually doing.


Reply With Quote
  #12 (permalink)  
Old 12-20-2004
badz
 
Posts: n/a
Default Re: PHP+MSSQL

I think this ancient problem..
since no one come with the answer...
I had serach for the answer.. for quite long time....
any one can help???

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 06:02 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0