PHP + MySQL - problem with BLOB
Posted on 2002-07-18
scripts use MySQL BLOB column to store binary files. I\m speaking about script download.php which should return stored data.
It worked for a long time without any problem. Code is below.
$sql = "SELECT file,filename FROM orders WHERE id = $id";
$result = mysql_query($sql);
$filename = mysql_result($result,0,'filename');
$file = mysql_result($result,0,'file');
Last week we've got a problem. Now variable $file doesn't contains entire BLOB, but only first 8 bytes. I've tried to use mysql_fetch_row - the same result.
Have anyone seen this before?