-
OCIResult(Resource id # rather than data?
Hello,
I having trouble with data populating a text field. I get:
OCIResult(Resource id #4,
rather than the data I expected...
I'm running PHP Version 4.2.3 on AIX 4.3.3 with Oracle 8.1.7.
Here's my code:
<HTML>
<HEAD>
<TITLE>Test</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER><B>TEST SELECT </B>
<BR><BR>
<?php
require('./db-include.inc');
putenv("ORACLE_HOME=/oracle/app/oracle/product/8.1.7");
$connection = OCILogon(DB_USER,DB_PASS,DB_NAME) or die("Couldn't Connect to DB!");
$stmt = OCIParse($connection, "SELECT * FROM TEST WHERE ONE='1'");
OCIExecute($stmt);
while(OCIFetch($stmt))
{
print "
<form action=gb_add.php method=post name=FormName>\n
<table width=400 border=1 cellspacing=2 cellpadding=2>\n
<tr>\n
<td>\n
<div align=center>Column One</div>\n
</td>\n
<td>\n
<div align=center>Column Two</div>\n
</td>\n
</tr>\n
<tr>\n
<td>\n
<div align=center><input type=text name=test1 value=\"OCIResult($stmt,\"ONE\")\" size=60 border=0></div>\n
</td>\n
<td>\n
<div align=center><input type=text name=test2 value=\"OCIResult($stmt,\"TWO\")\" size=60 border=0></div>\n
</td>\n
</tr>\n";
}
print "
</table>\n
<input type=submit name=submit value=\"Update Record\">\n
</form>\n";
?>
</CENTER>
</BODY>
</HTML>
Any help would be greatly appreciated. I tried several different variations of getting the "data" to show up inside the text field.
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|