Re: binary data - MSSQL

From: Date: Wed, 09 Jan 2002 11:35:31 +0000
Subject: Re: binary data - MSSQL
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-79895@lists.php.net to get a copy of this message
Hy Peter, Peter Lavender wrote:
Hi Everyone, I did ask this earlier, but I have made some head way since, but I'm still not sure that I have things right. What datatype should I use for zip files?
You should use the blob type therefore
How do I create a link to a file to be downloaded from the database?
first you need a php script that pulls the data out of the database and echoes an appropriate header, and after this all the binary data of your file, you would then link it and give the id or whatever you use to identify it in the database as parameter to this script.
All the examples I have read all relate to images, which hasn't really helped.
it's exactly the same with zips as with images, the only difference is the header for the mime type which is "image/gif" for gif's and "application/zip" for zips If you already know everything for images out oif a Mysql, then i don't tell it again here - ask if you still have problems! henning

« previous php.general (#79895) next »