Aura.SqlQuery
Aura.SqlQuery copied to clipboard
Update '->where' method with binding params don't working
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.
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.
I'd use the following:
->where('id = :id')
->bindValue('id',2);
I'm not 100% sure that format works.