Man access is really weird!
I really prefer mysql, but .............i got to finish this work!
Can someone tell me what is wrong with this code??
the image is stored as an OLE object is access
if ($_SESSION['lng'] == 'ENG0'){
$dados = odbc_pconnect('dados_en', 'syscom', 'syscom');
}
else {
$dados = odbc_pconnect('dados_pt', 'syscom', 'syscom');
}
$assinantes = odbc_pconnect('assinantes', 'syscom', 'syscom');
$comm = odbc_pconnect ('dados_comm', 'syscom', 'syscom');
$gestao = odbc_pconnect ('gestao', 'syscom', 'syscom');
$fotos = "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));";
$foto = odbc_exec($gestao,"$fotos");
//odbc_binmode($fotos, ODBC_BINMODE_RETURN);
header ("Content-type: image/jpeg");
echo odbc_result($foto,"photo");
u saw something wrong?
tell me what u saw because i can´t find anything, a friend told me that i had to use udbc_binmode, but when i use that all i can get is '1' ( strange)
header doesn´t seams to work because i´m getting alot of binany stuff in my browser!