
I have tried many other options, I just assumed that if the i could convert to hex, blob the data and then re-convert it would work. Here is some more code that DOES NOT work ------------------------------------------ <?php $connH=odbc_pconnect("myDB","me","mypass") or die(odbc_errormsg()); $result=odbc_exec($connH, "select top 1 image from images where id='2'"); if ($result) { odbc_longreadlen($result, 131072); odbc_binmode($result,ODBC_BINMODE_RETURN); $out=odbc_result($result, 1); } ?> ---------------------------------------- On 3/17/10, ashok+skunkworks@parliaments.info <ashok+skunkworks@parliaments.info> wrote:
On Wed, Mar 17, 2010 at 10:55 AM, ukuta ken <ukutaken@gmail.com> wrote:
$connH=odbc_pconnect("myDB","me","mypassword") or die(odbc_errormsg()); $result=odbc_exec($connH, "select top 1 image from images where id='1'"); if ($result) { odbc_longreadlen($result, 131072); odbc_binmode($result,ODBC_BINMODE_CONVERT); $m_FValue=odbc_result($result, 1); header("Content-Type: image/jpeg"); echo $out=hex2bin($m_FValue); } ?>
Doesnt sybase have a 'blob' / 'var binary' field type ... ? why are you doing this conversion from hex2bin ? Why dont you store the image as binary ? _______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Server donations spreadsheet http://spreadsheets.google.com/ccc?key=0AopdHkqSqKL-dHlQVTMxU1VBdU1BSWJxdy1f... ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke