Answer the question
In order to leave comments, you need to log in
No Oracle DB fetch results in PHP, why?
For some reason, the function does not work oci_fetch ();
when a query is executed in Oracle SQL Developer, the data is returned, but not in PHP.
Code example:
$username = 'user';
$password = 'pass';
$db = 'db';
$connect = OCILogon($username, $password, $db, 'AL32UTF8');
$select = "
select row
from scheme.table
";
$query = OCI_Parse($connect, $select);
// Возвращает true
oci_define_by_name($query, 'ROW', $row);
// Возвращает true
oci_execute($query);
// Возвращает false
while (oci_fetch($query)) {
echo $row;
}
oci_free_statement($query);
oci_close($connect);
Answer the question
In order to leave comments, you need to log in
If you do not understand the problem, then try using PDO.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question