how set LIMIT 5 OFFSET 3 ?
khanhnam99 opened this issue · 1 comments
khanhnam99 commented
how set LIMIT 5 OFFSET 3 ?
huseyinaslim commented
/**
* A convenient SELECT * function.
*
* @param string $tableName The name of the database table to work with.
* @param int|array $numRows Array to define SQL limit in format Array ($offset, $count)
* or only $count
* @param string|array $columns Desired columns
*
* @return array|MysqliDb Contains the returned rows from the select query.
* @throws Exception
*/
public function get($tableName, $numRows = null, $columns = '*')
{
* @param int|array $numRows Array to define SQL limit in format Array ($offset, $count)
<?php
...
$users = $db->get('users', [3,5]); // LIMIT 5 OFFSET 3
Good day