Bilal Qadri
Bilal Qadri

Reputation: 141

php function oci_fetch_array is returning only one row

$stid = oci_parse('SELECT FIRSTNAME, LASTNAME, DESIGNATION, DEPARTMENT, BRANCH FROM USERS');  
while (($row = oci_fetch_array($stid, OCI_ASSOC + OCI_RETURN_NULLS
                        | OCI_RETURN_LOBS)) != false) {

            $result[] = $row;
            }

oci_fetch_array is returning only one row while there are many rows in the table.

Upvotes: 0

Views: 584

Answers (1)

Barbaros Özhan
Barbaros Özhan

Reputation: 65228

it seems, your problem is related to | before OCI_RETURN_LOBS part.

Make your statement as below :

($row = oci_fetch_array($stid, OCI_ASSOC + OCI_RETURN_NULLS + OCI_RETURN_LOBS)) != false.

Upvotes: 1

Related Questions