From:             farkasmate_ at freemail dot hu
Operating system: win XP sp2
PHP version:      5.3.0
PHP Bug Type:     PDO related
Bug description:  PDO::FETCH_ORI_REL not working

Description:
------------
pdo mysql error.
PDO::FETCH_ORI_REL not working

sql result about 1000 rows.
I need to catch 555. row item but i get always first row (0.) of result.


Reproduce code:
---------------
$this->db_conn = new
PDO("mysql:host=$db;dbname=mysql;EnableScrollableCursors=1",$db_username,$db_password);//connect
mysql
$sql = "select * from tablename";
$this->db_conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);
//$stmt = $this->db_conn->query($sql) or die("ERROR: " . implode(":",
$this->db_conn->errorInfo()));
$stmt = $this->db_conn->prepare($sql,  array( PDO::ATTR_CURSOR =>
PDO::CURSOR_SCROLL )    );
$stmt->execute();
$search_row = 555;
$row = $stmt->fetch(PDO::FETCH_NUM , PDO::FETCH_ORI_REL, $search_row );
var_dump($row);

Expected result:
----------------
catch 555. row

Actual result:
--------------
catch first row


-- 
Edit bug report at http://bugs.php.net/?id=49017&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=49017&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=49017&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=49017&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=49017&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=49017&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=49017&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=49017&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=49017&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=49017&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=49017&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=49017&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=49017&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=49017&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=49017&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=49017&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=49017&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=49017&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=49017&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=49017&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=49017&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=49017&r=mysqlcfg

Reply via email to