Re: Insert File in a Database

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: Insert File in a Database
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-9581@lists.php.net to get a copy of this message
I think you need write a line with a code like this one. Because your data contais quotes. $data = addslashes(fread(fopen($binFile, "r"), filesize($binFile))); - where $binFile is the name of your variable FILE (wich you want to insert at your DB ). If you are confused see the addslashes in php doc. Mario H.C.T. Mais um brasileiro aqui !. :) Anderson Sone wrote: > How can i insert a file in a Database? > I´m using PHP + MSSQL 2k > > I´m trying to insert a .doc file in a db. I read the file and put it in a > db. > I´m having a lot of problem... like: > _____________ > Warning: MS SQL message: Unclosed quotation mark before the character string > 'ÐÏà¡Ýá'. (severity 15) in C:\PHP/upload/upload4.php3 on line 28 > _____________ > > Tks. > Anderson Sone > Brazil-Curitiba > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#9581) next »