php - How can I pass an integer to an ORACLE database? -


i have pass parameters numbers php oracle. there way ? cause need delete row id given. if try oci_by_name get: "numeric or value error: character number conversion error ora-06512"

here code

<?php    $conn = oci_connect('dbadmin', 'dbadmin', 'petloversdb'); if (!$conn) {     $e = oci_error();     trigger_error(htmlentities($e['message'], ent_quotes), e_user_error); }             $deleteoption = $_get['selectedid'];              $categoryselected = $_get['selectedoption'];          if($categoryselected == "pet type"){               $stid = ociparse($conn, "begin  setting_package.delete_type(:p1); end;");         }           oci_bind_by_name($stid, ':p1', $deleteoption);         oci_execute($stid);          oci_close($conn);  ?>    

any suggestions appreciated.

depends setting_package.delete_type procedure expect. if varchar2 handle inside pl/sql routine, otherwise pre-check in php , pass number, otherwise pl/sql call crash think ora-01722: not valid number or so.


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -