PHP 8.5.0 Alpha 1 available for testing

Voting

: max(two, zero)?
(Example: nine)

The Note You're Voting On

tower98 at gmail dot com
14 years ago
Notice (PHP 5.2.12-pl0-gentoo):
You can parse empty query, you can execute empty query (returns true), but you cannot fetch data from empty query. So, if you provide query as variable, make sure it isn't empty.

<?php
$q
= oci_parse($c, "");
if(
$q != false){
// parsing empty query != false
if(oci_execute($q){
// executing empty query != false
if(oci_fetch_all($q, $data, 0, -1, OCI_FETCHSTATEMENT_BY_ROW) == false){
// but fetching executed empty query results in error (ORA-24338: statement handle not executed)
$e = oci_error($q);
echo
$e['message'];
}
}
else{
$e = oci_error($q);
echo
$e['message'];
}
}
else{
$e = oci_error($link);
echo
$e['message'];
}
?>

<< Back to user notes page

To Top