nette / database

💾 A database layer with a familiar PDO-like API but much more powerful. Building queries, advanced joins, drivers for MySQL, PostgreSQL, SQLite, MS SQL Server and Oracle.
https://doc.nette.org/database
Other
512 stars 108 forks source link

Questionmark not properly parsed #268

Closed prkwcz closed 3 years ago

prkwcz commented 3 years ago

Version: 3.1

Bug Description

In the previous versions, a query was possible as follows: $db->fetchAll("SELECT A FROM B WHERE C IS NULL AND ?", ['D' => 'E']); Since 3.1 this is no longer possible, no results are displayed (although the manually generated SQL statement returns results).

Steps To Reproduce

in 3.07: $db->fetchAll("SELECT A FROM B WHERE C IS NULL AND ?", ['D' => 'E']); in 3.1: $db->fetchAll("SELECT A FROM B WHERE C IS NULL AND ?", ['D' => 'E']);

Expected Behavior

It would be expected that under 3.1 the statement would also deliver results. In this simple example, it does not make much sense to use the questionmark, but there are complex queries where it is very helpful to use it as described above.