|
Posted by Richard Conway on 07/17/05 22:16
Hi there,
After much faffing about, I have managed to get PHP working with Oracle
- kind of :)
It appears that for some reason, whenver I try to execute a select
statment that includes a column which contains text, I get a ORA-03106:
fatal two-task communication protocol error. This does not happen with
columns of numbers or dates as these work fine. The code I am using is
as follows:
<!------ Begin Code --------->
$db = "<database connection details>";
if ($ora_conn = oci_connect("Username", "Password",$db)) {
echo "<B>SUCCESS ! Connected to database<B>\n";
} else {
echo "<B>Could not connect to database<B>\n";
}
// Select Data...
$query1="SELECT LASTNAME FROM GUESTS";
$s = OCI_Parse($ora_conn, $query1);
oci_define_by_name($s, "LASTNAME", $var1);
oci_execute($s);
while (oci_fetch($s)) {
echo $var1 . "<BR>";
}
oci_close($ora_conn);
<!------ End Code --------->
Any help on this would be muchly appreciated.
Thanks,
Richard
Navigation:
[Reply to this message]
|