SQLSTATE[42804]: Datatype mismatch: 7 ERROR: argument of AND must be type boolean, not type integer LINE 1: ...l, u.votes AS u__votes FROM users_albums u WHERE (u.id AND... ^