Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Parse errors

DesiNov 19 2003 — edited Nov 23 2003
PHP experts:

I am using an example given on the OTN site and I cut and paste the code but I'm getting parse errors.

Parse error: parse error, unexpected T_STRING in d:\oracle\ora92\apache\apache\htdocs\db1.php on line 13

Line 13 is: $mycursor ora_open ($conn);

Here is the code that I'm using.

Can someone please help me with this.
Thanks
Mohsin


HTML>
<TITLE>First Variables Example</TITLE>
<BODY>

<?php
$tns = 'o9ir2';

$user = "scott@$tns";
$pass = 'tiger';
$q1 = 'SELECT ename,deptno FROM emp';
$conn = ora_logon($user, $pass);

$mycursor ora_open ($conn);
ora_parse ($mycursor, $q1, 0);
ora_exec ($mycursor);

while (ora_fetch($mycursor)) {
echo "RESULT: ora_getcolumn ($mycursor, 0), ora_getcolumn ($mycursor, 1) <br>";
}
ora_close($mycursor);
?>

</BODY>
</HTML>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 21 2003
Added on Nov 19 2003
4 comments
447 views