Hi all

Im having problems storing a MS word document as an
image data type in a MS SQL Server 2000. Im getting as
far as the query but i am getting the following error:

Warning: mssql_query(): message: Unclosed quotation
mark before the character string
'ÐÏࡱá'.
(severity 15) in /var/www/htdocs/searches3.php on line
23
Warning: mssql_query(): Query failed in
/var/www/htdocs/searches3.php on line 23
Couldn't add file to database

Here is the code leading up to it....
//lets open the file and read the contents
$filehandle = fopen($tmpfilename, "r");
$filecontent = fread($filehandle, $filesize);
//addslashes so that it can be stored in the database
$data = addslashes($filecontent);
//now we need to do the query to insert the word doc
into the database
$query = "insert into temp1 (id,leadsheet) values
('$phonenum','$data')";
mssql_query($query,$numero) or die("Couldn't add file
to database");

......

It seems to me that the addslashes isnt working and
the  query is failing because of this? Has anyone seen
this before or know what i am doing wrong? Ive been on
this for ages and are not getting anywhere.. Thanks
for any help in advance!

Bob


________________________________________________________________________
BT Yahoo! Broadband - Free modem offer, sign up online today and save £80 
http://btyahoo.yahoo.co.uk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to