note 52981 added to function.mssql-query

From: Date: Thu, 19 May 2005 14:46:06 +0000
Subject: note 52981 added to function.mssql-query
Groups: php.notes 
Request: Send a blank email to php-notes+get-89643@lists.php.net to get a copy of this message
I've to store files in a MSSQL database I've tried with that : $datastring = file_get_contents("img.jpg"); $data = unpack("H*hex", $datastring); mssql_query("insert into images (name, data) values ('img.jpg', 0x".$data['hex'].")"); But I get that error : Warning: unpack() [function.unpack]: Type H: outside of string in ... PHP Version 5.0.5-dev MSSQL 8.00.194 IIS 5.1 for Win XP So it works with apache and mysql but ... I've to make it work with microsoft Sorry for my english ... I'm french :-) ---- Manual Page -- http://www.php.net/manual/en/function.mssql-query.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+52981 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52981&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52981&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52981&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52981&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52981&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+52981&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#89643) next »