All...
I'm using PHP 4.2.2 with Oracle 8i (8.1.6), and have encountered a puzzling situation while developing an Oracle session handler using a CLOB for the session values. In the read handler, I have constructed the query to return either a SINGLE RECORD or nothing. What puzzles me is why:
ocifetchinto($stmt, &$data, OCI_ASSOC);
$value = $data["VALUE"]]->load();
FAILS with "Call to a member function on a non-object", yet:
while (ocifetchinto($stmt, &$data, OCI_ASSOC)) {
$value = ($data["VALUE"]]->load());
}
works? Oddly enough, I successfully use the former method in other areas of my application, but not in queries on LOB data. It appears that the LOB identifier is not being assigned (to $value) seemingly until AFTER a second call (yet there will be NO MORE than a single record returned) to ocifetchinto. Any ideas? TIA
-- Gary