note 55404 rejected from function.mssql-query by nlopess

From: Date: Tue, 02 Aug 2005 15:36:58 +0000
Subject: note 55404 rejected from function.mssql-query by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-92958@lists.php.net to get a copy of this message
Note Submitter: serge_liale at creolink dot com ---- I have unsuccessfully try this script: // storing a file $datastring = file_get_contents("img.jpg"); $data = unpack("H*hex", $datastring); mssql_query("insert into images (name, data) values ('img.jpg', 0x".$data['hex'].")"); // retrieving $result = mssql_query("select data from images where name = 'img.jpg'"); $row = mssql_fetch_assoc($result); header("Content-type: image/jpeg;"); echo $row['data']; to store and retrieve an image in a sql server 2000 with php. So if someone has tried another script, i'll be proud to get it. Thank

« previous php.notes (#92958) next »