Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how set LIMIT 5 OFFSET 3 ? #1023

Open
khanhnam99 opened this issue Nov 9, 2023 · 1 comment
Open

how set LIMIT 5 OFFSET 3 ? #1023

khanhnam99 opened this issue Nov 9, 2023 · 1 comment

Comments

@khanhnam99
Copy link

how set LIMIT 5 OFFSET 3 ?

@huseyinaslim
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants