Page 1 of 1

ask - Download all from blob

Posted: Tue Jan 25, 2011 10:32 pm
by monmon
please help,
i want to download zip file from blob not 1 by 1, but all
this is my working code download file 1 by 1

Code: Select all

$code=$_GET['fileId'];
include("config.php");

$query = "SELECT * FROM profile where code='$code'";
$result = mysql_query($query) or die("Couldn't get file list");
if(mysql_num_rows($result) == 1)
{
$fileContent = @mysql_result($result, 0, "content");
$code = @mysql_result($result, 0, "code");
header('Content-Disposition: attachment; filename="' . $code . '"'); 
header("Content-type: application/zip");
echo $fileContent;
}
else
{
echo "Record doesn't exist.";
}

thx

Re: ask - Download all from blob

Posted: Wed Feb 02, 2011 3:30 pm
by Jade
Hmm. I'm not sure you can. The only thing that comes to mind is trying to zip all of the files into another zip...haha if that made any sense whatsoever.