Re: How to store a file into MSSQL?

From: Date: Tue, 15 Jul 2003 22:57:53 +0000
Subject: Re: How to store a file into MSSQL?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-155334@lists.php.net to get a copy of this message
How is defined your temp_test table ? PHP don't truncate content... you only need to define a binary blob field and store data into it.. regard, P.E. Baroiller "Javier" <s2r@gmx.net> a écrit dans le message de news:Xns93B9C8FE4F57s2rgmxnet@216.92.131.4... > Hi everybody, I've trying to store a into a MSSQL Server (7 or 2k) using > an example I found on the web (www.php.net). > > Is it possible that PHP (4.3.2) just store 4k of data? Because after > inserting a test image with: > > $oDatos is an object that handles queries. > > // storing a file > $datastring = join('',file("logo2.jpg")); > $data = unpack("H*hex", $datastring); > $oDatos->query( "insert into temp_test (test) values ( 0x" . > $data['hex'] > .")" ); > > A select will return a 4K file. Is it possible? > > $row = $oDatos->getData("select test from temp_test"); > //file://$row = mssql_fetch_assoc($result); > $fp = fopen('copy.jpg','w'); > > > So... is there anyway to store a file that it is larger than 4K? Or am I > missing something? :) > > Thanks. > > -- > *** s2r - public key: (http://leeloo.mine.nu/s2r-gmx.sig)

« previous php.general (#155334) next »