I have a question about query in Oracle :
The problem is, the result of oci_num_rows is always 0.
and here is my code so far :
$query = "SELECT IP_ADDRESS, STATUS FROM SEIAPPS_IP_ADDRESS WHERE IP_ADDRESS='$ip'";
$result = oci_parse($c1, $query);
oci_execute($result);
echo $found = oci_num_rows($result);
To make it sure, I try to clear the condition "WHERE IP_ADDRESS='$ip'". Still same with the result is 0 whereas in my table there are some data.
Any advice ?
Use this:
$query = "SELECT IP_ADDRESS, STATUS FROM SEIAPPS_IP_ADDRESS WHERE IP_ADDRESS='$ip'";
$result = oci_parse($c1, $query);
oci_execute($result);
$numrows = oci_fetch_all($result, $res);
echo $numrows." Rows";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With