We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Bug in query builder inWhere + bind

Error on using WHERE ... IN (...) clause + simple bindidng in query builder

$my_shared = WallPosts::query()
            ->where('profile_id = :my_id:')
            ->inWhere('shared_post_id',array(1,2,3,4,5))
            ->bind(array('my_id' => 2))
            ->execute();

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

When removing "bind" or "inWhere" everything is fine.

What is wrong? Maybe I've missed smth??

This is already fixed in the 2.0.x branch, could you please try again compiling from that branch?