> I guess another option would be to encode the retrieved data as base64,
like
> this (works in 7.2devel *only*):
>
> SELECT encode(image, 'hex') FROM imagetable WHERE ...
>
> And then convert from hex back to bin:
>
> function hex2bin($data)
> {
> $data = trim($data);
> $len = strlen($data);
> return pack("H" . $len, $data);
> }
>
Sorry, I meant to say "to encode the retrieved data as hex, like . . ."
above. But you could also use base64:
SELECT encode(image, 'base64') FROM imagetable WHERE ...
function base64_to_bin($data)
{
$data = trim($data);
return base64_decode($data);
}
-- Joe