You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a model table, I configure Model.beforeSave for attributing the logged user in the new registry. And Model.beforeFind to retrieve just the registers that this user saved.
But if I have one where's clausule in a controller or other beforeFind, it causes an error "Error: SQLSTATE[HY093]: Invalid parameter number".
@tiagoa the sql query has a single param: WHERE user_id in (:c0)', whille two params are sent over, are you sure that you have pasted exactly your Controller code?
Don't you have a space after "IN" ?
WRONG
->where(['user_id IN ' => array_keys($users)], [], true);
In a model table, I configure Model.beforeSave for attributing the logged user in the new registry. And Model.beforeFind to retrieve just the registers that this user saved.
But if I have one where's clausule in a controller or other beforeFind, it causes an error "Error: SQLSTATE[HY093]: Invalid parameter number".
And then in a Controller:
Return:
The text was updated successfully, but these errors were encountered: