Since the oracle does not have a ready-made function for checking the created request. So I tried under the code to check if QUERY is valid or not.
if(isset($_POST['btn_Submit_Query'])) { $check_query=$_POST['txtQuery']; echo $check_query; $valid = false; $stmt = oci_parse($DB, $check_query); echo "Statement" . $stmt; //oci_define_by_name($stmt, 'NUMBER_OF_ROWS', $number_of_rows); oci_execute($stmt, OCI_DEFAULT); echo oci_num_rows($stmt); }
I received the following warnings in execution:
Warning: oci_parse() expects parameter 1 to be resource, object given in D:\xampp\htdocs\app\DashBoardSite\Admin\querybuilder.php on line 899 Statement Warning: oci_execute() expects parameter 1 to be resource, null given in D:\xampp\htdocs\app\DashBoardSite\Admin\querybuilder.php on line 902 Warning: oci_num_rows() expects parameter 1 to be resource, null given in D:\xampp\htdocs\app\DashBoardSite\Admin\querybuilder.php on line 903
Where is my mistake?
source share