Alright here is the scenario, I am storing images as blobs in a database. I am retrieving them by their ID which is linked to and the variable comes from the link.
So, for picture 42, the $_GET['id'] echo's 42.
I assign
$id = $_GET['id'];
echoing this gives me the correct number.
Then I try this statement:
$gotten = mysql_query("SELECT `filecontent` FROM `tbl_dmrinfo` WHERE `id` = '$id'");
Which does not correctly retrieve the blob. However,
$gotten = mysql_query("SELECT `filecontent` FROM `tbl_dmrinfo` WHERE `id` = 42");
Works perfectly. So I have to assume I have a problem with my SQL statement.
Any light would be greatly appreciated.
Rob