auraphp / Aura.SqlQuery

Independent query builders for MySQL, PostgreSQL, SQLite, and Microsoft SQL Server.
MIT License
452 stars 86 forks source link

Update '->where' method with binding params don't working #176

Open FAST-JE opened 4 years ago

FAST-JE commented 4 years ago

Hi, everyone. Method 'where' with passed two params don't working for me. I do that ->where('gir = :gir', ['gir' => 'gir_val']) Also phpstorm shows warning with the text:

Method call is provided 2 parameters, but the method signature uses 1 parameters.

Screen Shot 2020-02-22 at 3 43 54 PM
bigSiebs commented 4 years ago

Did you install via composer? I ran into this same issue because I installed via composer with the prefer-stable option set to true. I was reading the documentation for the 3.x branch, but unknowingly using the 2.x branch that composer installed. Running composer require aura/sqlquery 3.x-dev fixed the issue for me.

jimbo8098 commented 4 years ago

I'd use the following:

->where('id = :id')
->bindValue('id',2);

I'm not 100% sure that format works.