ThingEngineer/PHP-MySQLi-Database-Class

how set LIMIT 5 OFFSET 3 ?

khanhnam99 opened this issue · 1 comments

how set LIMIT 5 OFFSET 3 ?

    /**
     * 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