PHP 8.5.0 Alpha 4 available for testing

Voting

: min(two, one)?
(Example: nine)

The Note You're Voting On

php at tobias dot olsson dot be
22 years ago
if you need to change back bytea from the db to normal data, this will do that:

<?php
function pg_unescape_bytea($bytea) {
return eval(
"return \"".str_replace('$', '\\$', str_replace('"', '\\"', $bytea))."\";");
}

// use like this
$rs = pg_query($conn, "SELECT image from images LIMIT 1");
$image = pg_unescape_bytea(pg_fetch_result($rs, 0, 0));
?>

/Tobias

<< Back to user notes page

To Top