You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, I just stumbled over a small error in the database part of the documentation concerning the active Records. During explaining it to someone I realized you missplaced the parameters.
$query = $this->db->get('mytable', 10, 20);
// Produces: SELECT * FROM mytable LIMIT 20, 10 (in MySQL. Other databases have slightly different syntax)
-->
but it should be documented as LIMIT 10, 20
The text was updated successfully, but these errors were encountered:
In CI, the get parameters are: Table name, limit, offset
In Mysql when you use limit, if you use 2 values, the first is the offset and the 2nd is the number of rows:
"With two arguments, the first argument specifies the offset of the first row to return, and the second specifies the maximum number of rows to return." - MySQL
Hi there, I just stumbled over a small error in the database part of the documentation concerning the active Records. During explaining it to someone I realized you missplaced the parameters.
$query = $this->db->get('mytable', 10, 20);
// Produces: SELECT * FROM mytable LIMIT 20, 10 (in MySQL. Other databases have slightly different syntax)
-->
but it should be documented as LIMIT 10, 20
The text was updated successfully, but these errors were encountered: