Skip to content

Adding NN to query with SqlsrvDriver (Dibi\Fluent) #908

@TumaMilan

Description

@TumaMilan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Triage: Now

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions