freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] TDS wants to show me raw hex via PHP from MSSQL2k
- From: Mario.Tschursch AT ic3s.de
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] TDS wants to show me raw hex via PHP from MSSQL2k
- Date: Wed, 6 Aug 2003 10:28:11 +0200
there is another thing:
MS SQL stores images as hex starting with 0x
to get raw image data u have to unpack the data coming from MS SQL server
-- begin code
$sql = " select imLarge from image where cCompanyID = '10CC-EAFH-6E59' and
ititlenum = $id ";
// echo "sql is $sql for now";
$dbh= mssql_connect( $db , $user , $pass );
$dbr = mssql_query( $sql , $dbh );
$row = mssql_fetch_array($dbr) ;
$rawdata = join('',unpack("H*",substr($row['imLarge'],2)));
Header( "Content-type: image/jpeg" );
?>
<img src="<? echo $rawdata; ?>" >
-- end code.
Mario Tschursch
Entwickler
IC3S Information, Computer und Solartechnik AG
Postfach 1128, 25442 Quickborn, Germany
Telefon: +49.4106.655-402
Telefax: +49.4106.637-101
E-Mail Mario.Tschursch AT ic3s.de
Web http://www.ic3s.de/
Vorstand: Jan Behrmann (Vorsitzender), Stefan Fehlauer
Aufsichtsrat: Sven Niklasson (Vorsitzender)
Dresdner Bank (200 800 00), Kto. 0123 9582 00
Commerzbank (200 400 00), Kto. 8540 288
Amtsgericht Pinneberg HRB 4477
UST.IdNr. DE184532766
-
[freetds] TDS wants to show me raw hex via PHP from MSSQL2k,
Eddie Johnson, 08/05/2003
-
Re: [freetds] TDS wants to show me raw hex via PHP from MSSQL2k,
James K. Lowden, 08/05/2003
-
Re: [freetds] TDS wants to show me raw hex via PHP from MSSQL2k,
Mario . Tschursch, 08/06/2003
- Re: [freetds] TDS wants to show me raw hex via PHP from MSSQL2k, Mario . Tschursch, 08/06/2003
- Re: [freetds] TDS wants to show me raw hex via PHP from MSSQL2k, Michael Peppler, 08/06/2003
- Re: [freetds] TDS wants to show me raw hex via PHP from MSSQL2k, Eddie Johnson, 08/06/2003
-
Re: [freetds] TDS wants to show me raw hex via PHP from MSSQL2k,
Mario . Tschursch, 08/06/2003
-
Re: [freetds] TDS wants to show me raw hex via PHP from MSSQL2k,
James K. Lowden, 08/05/2003
Archive powered by MHonArc 2.6.24.