Edit report at https://bugs.php.net/bug.php?id=37839&edit=1

 ID:                 37839
 Updated by:         ssuffic...@php.net
 Reported by:        rael at grad dot icmc dot usp dot br
 Summary:            Limit of returned rows
-Status:             Open
+Status:             Wont fix
 Type:               Feature/Change Request
 Package:            PDO related
 Operating System:   Any
 PHP Version:        5.1.4
 Block user comment: N
 Private report:     N

 New Comment:

This is easily emulated using the existing fetch() function.


Previous Comments:
------------------------------------------------------------------------
[2011-12-24 06:33:08] ssuffic...@php.net

This same effect is achievable using the fetch method with the offset argument 
and limiting the results in your fetch loop.

It could be argued the offset and limit arguments should be added to the 
fetchAll() method though.

------------------------------------------------------------------------
[2006-06-18 17:17:06] rael at grad dot icmc dot usp dot br

Description:
------------
A PDO method for limit the number of rows returned from a query, independent of 
the used DBMS. This feature is available in DBMS abstraction packages, like 
ADODB (and in Java JDBC too). Something like this:

function setLimit($limit, $offset);

Reproduce code:
---------------
$con = new PDO('mysql:host=localhost;dbname=test', $user, $pass);

$stmt = $con->prepare("SELECT * FROM table");
$stmt->setLimit(10, 2);

Expected result:
----------------
10 tableresults starting from position 2

Actual result:
--------------
Function not exists yet.


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=37839&edit=1

Reply via email to