I am trying to create a class for executing oracle sql statements on PHP.
here is my index.php where I am trying to call my function
I would say, first check with your database connectivity, then check, whether it is connected with right database or not ? Check for how many rows is being selected.
I will recommend you to use show_error()
function to validate your database connection.
The reasons why you are keep getting a blank page are:
1. $this -> totalRows = oci_num_rows($this -> statement);
oci_num_rows() function does not return the number of selected rows as you might think. It returns number of rows affected by some DML statement(except SELECT statement). So in your case it will always return 0 and as a result of it the condition
2. if($this -> totalRows > 0)
evaluates to false and while
loop will never be executed.
Besides, oci_fetch_array() fetches one row at a time or FALSE if there is no more rows to return, so if($this -> totalRows > 0)
in your case seems redundant.