I have seen my EXACT question posted here before but the post did not receive replies. I am new to PHP, so please help if you can:

Error: OCIBindByName: ORA-01036: illegal variable name/number

Code:

$sql = "SELECT visits_seq.nextval INTO :v_result from dual";
$c = db_connect();
$s = OCIParse($c, $sql);
ocibindbyname($s, ":v_result", &$vresult, -1);
OCIExecute($s, OCI_COMMIT_ON_SUCCESS);
return OCIResult($s, $vresult);
OCILogoff($c);

    Just a guess but it's probably the ampersand it does not like.

      Write a Reply...