Skip to content

Bug: [QueryBuilder] if set limit to 0, it will return all data. Perhaps it should return 0 data. #8278

Closed
@RikhzanAmir

Description

@RikhzanAmir

PHP Version

8.2

CodeIgniter4 Version

4

CodeIgniter4 Installation Method

Composer (using codeigniter4/appstarter)

Which operating systems have you tested for this bug?

Linux

Which server did you use?

fpm-fcgi

Database

MariaDB 10.2.44

What happened?

$builder->limit(0, 0) , set the limit => 0 and the query will shows all the table rows. It should return no rows because limit is 0.

Steps to Reproduce

$builder->limit(0,0)

Expected Output

it should return no rows if it set limit to 0.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix them

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions