PHP Oracle Warnings

kevbob650 used Ask the Experts™
I'm getting PHP Warnings that I'm not able to debug and can't find any useful explanations when searching:

$sql = "select PRODUCT from table where ... ";
      $rs = oci_parse($this->Connection,$sql);

      if($row = oci_fetch_object($rs, OCI_ASSOC)) {
            $myobjects->product = $row->PRODUCT;
PHP Warning:  oci_execute(): ORA-00936: missing expression
PHP Warning:  oci_fetch_object(): ORA-24374: define not done before fetch or execute and fetch in ...

Any assistance would be appreciated!
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Distinguished Expert 2018
The "ORA-00936: missing expression" implies there is a syntax issue in the select.

You didn't post it all so we cannot help troubleshoot it.

Copy and paste the full select into sqlplus or some other tool and verify the syntax.
It is an issue of SELECT statement parameters or conditions you applied. Better post the full code of the statement.


It was a syntax error that I missed.  I need to check if the variables I am passing to the select statement are valid.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial