Doctrine_Pager error “Invalid parameter number” when using “IN” in “WHERE” clause

This post is just to inform fellow users of Doctrine about a problem with Doctrine_Pager using “IN” for “WHERE” clauses.

Simply put: Just don’t use it (at the moment), as it will result in the following error:

SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens

Instead, use orWhere() for instance to get the desired result.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *