Hi,
We are running Yii 1.03. This is the first time I have been experimenting with Active Records - up to now we have just been using custom SQL queries. I feel I am misunderstanding something though…
Take this code:
$sqlCondition = "person_id IN (:personId)";
$sqlParams['personId'] = '1111,2222';
$TransferObject = MTransfer::model()->findAll(array(
'condition' => $sqlCondition,
'params' => $sqlParams
));
I would have thought this would return two objects, one for person_id 1111, and one for person_id 2222. However it only returns one object - in this case 1111.
If I reverse the numbers (‘2222,1111’) then it will give me the object for person 2222 instead.
Forgive me if I am misunderstanding something obvious. How can I get this query to work?