Aura.SqlQuery icon indicating copy to clipboard operation
Aura.SqlQuery copied to clipboard

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

Open FAST-JE opened this issue 4 years ago • 2 comments

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

FAST-JE avatar Feb 22 '20 12:02 FAST-JE

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.

bigSiebs avatar Mar 18 '20 15:03 bigSiebs

I'd use the following:

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

I'm not 100% sure that format works.

jimbo8098 avatar Oct 20 '20 21:10 jimbo8098