Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ORA-00911 Error only with oci_execute

I've got a problem with the following request:

update
    pac_boolean_code
set
    BOO_CODE = 1
where
    PAC_PERSON_ASSOCIATION_ID = '2477764'
and
    DIC_BOOLEAN_CODE_TYP_ID = 'E-CALENDAR';

When I execute it in Toad, it works fine. But as soon as I try to use it through PHP using oci_execute, it returns me the "ORA-00911: invalid character" error.

I can't figure what is the problem as all fields are correct and it works when I use it directly in Toad.

If I remove the second where clause (DIC_BOOLEAN_CODE_TYP_ID), it also works !

Any idea to help me ?

like image 248
GRosay Avatar asked Nov 16 '25 05:11

GRosay


1 Answers

Remove the semi-colon character from the end of your statement, as documented on the oci_parse manual page:

SQL statements should not end with a semi-colon (";"). PL/SQL statements should end with a semi-colon (";").

like image 69
timclutton Avatar answered Nov 18 '25 19:11

timclutton



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!