From:             hellower at nate dot com
Operating system: windows 2000
PHP version:      5.1.0
PHP Bug Type:     Arrays related
Bug description:  pdo_oci  error

Description:
------------
when I use "ROWNUM" as bind variable name,
the query result set doesn't appeared.


db:  oracle 8.1.7.4
db os: aix 5.3

webserver: apache 2.0.55
webserver os: winows 2000

php : 5.1.0



Reproduce code:
---------------
<?php
$dbh = new PDO("oci:dbname=sslgm166_8174", 'XXX',
'XXX',array(PDO::ATTR_PERSISTENT => true));
echo "<pre>";
$sql = 'select * from  tab where rownum < :ROWNU';
$sth = $dbh->prepare($sql);
$sth->execute(array(':ROWNU' => 2));
$result = $sth->fetchAll();
print_r($result);

echo "<hr>";
$sql = 'select * from  tab where rownum < :ROWNUM';
$sth = $dbh->prepare($sql);
$sth->execute(array(':ROWNUM' => 2));
$result = $sth->fetchAll();
print_r($result);
echo "</pre>";
?>

Expected result:
----------------
Array
(
    [0] => Array
        (
            [TNAME] => CREDITS
            [0] => CREDITS
            [TABTYPE] => TABLE
            [1] => TABLE
            [CLUSTERID] => 
            [2] => 
        )

)
-----------------------------------------
Array
(
    [0] => Array
        (
            [TNAME] => CREDITS
            [0] => CREDITS
            [TABTYPE] => TABLE
            [1] => TABLE
            [CLUSTERID] => 
            [2] => 
        )

)

Actual result:
--------------
Array
(
    [0] => Array
        (
            [TNAME] => CREDITS
            [0] => CREDITS
            [TABTYPE] => TABLE
            [1] => TABLE
            [CLUSTERID] => 
            [2] => 
        )

)
-----------------------------------------
Array  <------------------- EMPTY ARRAY !!!
(

)

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

Reply via email to