datagrid
datagrid copied to clipboard
Adding NN to query with SqlsrvDriver (Dibi\Fluent)
Specification
When specifying string value in query, datagrid adds two "N" before leading string apostrophe.
For example:
$fluent->where("type = 'type1'") datagrid represents as "WHERE type = NN'type1'"
Source
I guess the reason is double calling of method escapeText() from SqlsrvDriver. Dibi from version 4.1 adds "N" before escaped text. Calling once is OK, calling twice doubles leading "N", which MSSQL server doesn't understand.
Workaround
- delete "N" from this method in SqlsrvDriver.php or
- use Dibi 4.0.3 or older