let me first explain the problem. I was performing a findAll query using criteria object.
The query is about fetching some apartments. Everything was working fine but when I added the parameter for number of rooms there were suddenly no results.
Now, this may be a PDO question more then Yii but perhaps not.
What I found through debugging is that the problem was with that number of rooms parameter was bound as ‘string’.
When I typecasted it as (int) $rooms the query returned results.
Maybe I wouldn’t be surprised with this if there weren’t two other params: both numbers but one bound as string and the other as integer. And the one bound as string is actually a primary key in joined table.