Skip to content

There are more parameters than placeholders. #210

Description

@Lumeriol

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions