ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:selectlimit

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
v5:reference:connection:selectlimit [2016/03/20 02:32] – [Description] mnewnhamv5:reference:connection:selectlimit [2023/07/25 12:55] (current) – [$rowsToReturn] typo dregad
Line 17: Line 17:
 The function executes a statement, and returns a handle to a recordset or false if the statement execution fails. The function executes a statement, and returns a handle to a recordset or false if the statement execution fails.
  
-The presentation of the returned data can be modified by the variables:   +The presentation of the returned data can be modified by:   
-  * [[v5:reference:adodb_fetch_mode|$ADODB_FETCH_MODE]] +  * [[v5:reference:adodb_fetch_mode|$ADODB_FETCH_MODE]] variable, 
-  * [[v5:reference:adodb_assoc_case|$ADODB_ASSOC_CASE]]  +  * [[v5:reference:adodb_assoc_case|ADODB_ASSOC_CASE]] constant, 
-  * The function [[v5:reference:connection:setfetchmode|setFetchMode()]].+  * [[v5:reference:connection:setfetchmode|setFetchMode()]] function.
  
 For a detailed description of the ''$sql'' and ''$bindvars'' parameters passed, see [[v5:reference:connection:execute|execute()]]. For a detailed description of the ''$sql'' and ''$bindvars'' parameters passed, see [[v5:reference:connection:execute|execute()]].
  
 ===== $rowsToReturn ===== ===== $rowsToReturn =====
-''$rowsToReturn'' indicates the maximum number of rows for the request to return. If End-Of-File is reached, the number returned my be less. If the value is -1, then all rows starting at the requested offset are returned. ''selectLimit()'' executed with -1 rows and -1 offset is the same as [[v5:reference:connection:execute|execute()]].+''$rowsToReturn'' indicates the maximum number of rows for the request to return. If End-Of-File is reached, the number returned may be less. If the value is -1, then all rows starting at the requested offset are returned. ''selectLimit()'' executed with -1 rows and -1 offset is the same as [[v5:reference:connection:execute|execute()]].
  
 ===== $startOffset ===== ===== $startOffset =====
Line 38: Line 38:
 */ */
 $SQL = "SELECT * FROM act"; $SQL = "SELECT * FROM act";
-$result = $db->SelectLimit($SQL,2,3); +$result = $db->selectLimit($SQL,2,3); 
-while ($r = $result->FetchRow())+while ($r = $result->fetchRow())
     print_r($r);     print_r($r);
  
v5/reference/connection/selectlimit.1458437576.txt.gz · Last modified: 2017/04/21 11:33 (external edit)