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

There are more parameters than placeholders. #210

Closed
Lumeriol opened this issue Oct 23, 2018 · 0 comments

Comments

@Lumeriol
Copy link

commented Oct 23, 2018

Version: 3.x-dev

Bug Description

Problem with get data from database on PHP 7.3, possible dependency with #208?
Same method, another bug.

Steps To Reproduce

public function getRandomOfferProducts(int $count = 1): array
        {
            return $this->db->table($this->repository)
                ->where([
                    'product.is_random_offer = ?' => 1,
                    'product.is_active = ?'       => 1,
                    'is_primary = ?'              => 1
                ])
                ->order('RAND()')
                ->limit($count)
                ->fetchAll();
       }

Stack trace

1.) ...\vendor\nette\database\src\Database\Connection.php:185
$params | array (4)
0 => "SELECT * FROM product_product_category ORDER BY RAND() LIMIT 5"
1 => 1
2 => 1
3 => 1
-- | --

2.) ...\vendor\nette\database\src\Database\Connection.php:160
...
8.) ...\nette\database\src\Database\Table\Selection.php:241

dg added a commit that referenced this issue Nov 26, 2018

@dg dg closed this in 3d7522b Nov 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.