Re: ms sql and images..

From: Date: Wed, 30 Apr 2003 13:51:19 +0000
Subject: Re: ms sql and images..
References: 1  Groups: php.i18n 
Request: Send a blank email to php-i18n+get-545@lists.php.net to get a copy of this message
likely php-general@lists.php.net is the better place to ask this kind of question at, and you should get more responses, since this list is particular on the interest related to internationalisation with PHP. Moriyoshi "csr" <cesar_marting@hotmail.com> wrote: > could anyone help me. > I am trying to upload a jpg file into a ms sql server 2000 database with an > image field and it's not working. This is the code so far.. > > $file = fopen ($HTTP_POST_FILES['upload_file']['tmp_name'],'rb') > or die ("File Open Failed "); //this is the jpg file > > $file_contents = fread ($file, filesize > ($HTTP_POST_FILES['upload_file']['tmp_name'])) > or die (" Can't read "); > fclose ($file); > > //put file in database > mssql_connect(HOST,USER,PASS) or die("unable to connect"); > mssql_select_db(PICTURE_DBASE) or die("unable to select database"); > //file data is the image field in the table files > mssql_query($SQL="Insert into files (file_data) values ('$file_contents')") > or die("MSSQL Query error: ". "<br><br>" ); > > > I got all sort of error messages from ms sql > > any ideas. > > thanks a lot > csr. > > > > -- > PHP Internationalization Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.i18n (#545) next »