I´ve been trying for weeks to get an image from access and put it on a page using this code:
$db = odbc_pconnect ('gestao', 'xx', 'pass');
$query = "SELECT [P-photos-PORT].[P id], [P-photos-PORT].photo, [P-photos-PORT].description, [P-photos-PORT].obs, [P-photos-PORT].[photo nbr] FROM [P-photos-PORT] WHERE ((([P-photos-PORT].[P id])=2) AND (([P-photos-PORT].[photo nbr])=2));";
$pics = odbc_exec($gestao,"$query");
//odbc_binmode($pics, ODBC_BINMODE_RETURN);
$i = 0;
while (odbc_fetch_row($pics)){
$i++;}
echo $i;
//header ("Content-type: image/jpeg");
echo odbc_binmode($pics,"photo");
the query is working and is getting results , and I know that because $ = 4
using this code above i get '1' instead of an image...........can you give me a solutionor at least u tell me what is the meaning of that?