Please take a look at the Issue::search() method in the model class file Issue.php. Towards the end of that method, there may be a typo that results in all previously set criteria conditions being overwritten, rather than appended to. If you change this:
$criteria->condition='project_id=:projectID';
to
$criteria->addCondition('project_id=:projectID');
It should address your search issues you are experiencing.
Thanks Jeff. I actually hooked onto this thread which sorted out the problem.
I meant to mention in this thread too, but I got too excited and finished the book!! Loved it by the way, I’m now “re-doing it” for my own project (which is different).
CDbCommand failed to execute the SQL statement: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens. The SQL statement executed was: SELECT COUNT(*) FROM `tbl_issue` `t` WHERE (project_id LIKE :ycp0) AND (project_id=:projectID)
i’m using Yii 1.1.10
So I found a solution before posting the prob, I guess it’s good but not so sure,