note 7208 deleted from Oracle functions by ronabop
| From: | ronabop@php.net | Date: | Tue, 08 Aug 2000 20:02:03 +0000 |
| Subject: | note 7208 deleted from Oracle functions by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-688@lists.php.net to get a copy of this message | ||
<P>
Sorry - The previous code example is not readable any more. Ive added the BR-Tags this
time.<BR>
I hope that it isnt too long for you to view this simple query in its readable format.
</P>
<P>
function GetName($ID, &$Name, &$Msg)<BR>
{<BR>
if ($Session = ora_plogon('Hello', 'World'))<BR>
{<BR>
if ($Cursor = ora_open($Session))<BR>
{<BR>
$SQL = 'SELECT NAME FROM PERSONS WHERE USERID = '' . $ID .
''';<BR>
<BR>
// Prepare SQL statement<BR>
if (ora_parse($Cursor, $SQL))<BR>
{<BR>
if (ora_exec($Cursor))<BR>
{<BR>
$Row[] = '';<BR>
<BR>
// Retrieve a complete row from the result set<BR>
if (ora_fetch_into($Cursor, &$Row))<BR>
{<BR>
$Name = $Row[0];<BR>
$Result = 0;<BR>
}<BR>
else<BR>
{<BR>
$Msg = ora_error($Cursor);<BR>
$Result = ora_errorcode($Cursor);<BR>
} // end of if expression<BR>
}<BR>
else<BR>
{<BR>
$Msg = ora_error($Cursor);<BR>
$Result = ora_errorcode($Cursor);<BR>
} // end of if expression<BR>
}<BR>
else<BR>
{<BR>
$Msg = ora_error($Cursor);<BR>
$Result = ora_errorcode($Cursor);<BR>
} // end of if expression<BR>
<BR>
ora_close($Cursor);<BR>
}<BR>
else<BR>
{<BR>
$Msg = ora_error($Session);<BR>
$Result = ora_errorcode($Session);<BR>
} // end of if expression<BR>
<BR>
ora_logoff($Session);<BR>
}<BR>
else<BR>
{<BR>
$Msg = ora_error($Session);<BR>
$Result = ora_errorcode($Session);<BR>
} // end of if expression<BR>
<BR>
return $Result;<BR>
}<BR>
</P>