From:             alexandre dot fontes at uol dot com dot br
Operating system: Red Hat 9.0
PHP version:      4.3.4
PHP Bug Type:     OCI8 related
Bug description:  select doesn't work with where clause

Description:
------------
The following program runs perfectly.
But if we put an WHERE clause on SELECT command, the program fails (Server
not found).
The same SELECT command, with the same WHERE clause runs ok on SQL*Plus.


Reproduce code:
---------------
<?php

$db_conn = ocilogon( "USER", "PASSWORD", "DATABASE" );
$cmdstr = "select name from people";
$parsed = ociparse($db_conn, $cmdstr);
ociexecute($parsed);
$nrows = ocifetchstatement($parsed, $results);

echo "<html><head><title>Oracle PHP Test</title></head><body>";
echo "<center><h2>Oracle PHP Test</h2><br>";
echo "<table border=1 cellspacing='0' width='50%'>\n\<tr>\n";
echo "<td><b>Name</b></td>\n<td><b>Salary</b></td>\n</tr>\n";

for ($i = 0; $i < $nrows; $i++ )
{
    echo "<tr>\n";
    echo "<td>" . $results["NAME"][$i] . "</td>";
    echo "</tr>\n";
}

echo "<tr><td colspan='2'> Number of Rows: $nrows</td></tr></table>";
echo "<br><em>If you see data, then it
works!</em><br></center></body></html>\n";

?>



-- 
Edit bug report at http://bugs.php.net/?id=27194&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27194&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27194&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27194&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27194&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27194&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27194&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27194&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27194&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27194&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27194&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27194&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27194&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27194&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27194&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27194&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27194&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27194&r=float

Reply via email to