alexjose
(Alexjose604)
June 27, 2011, 4:40am
1
Hello Friends,
I have to store the ids of a particular checkbox fields into one field. The values are primary keys in another table. But how will I build relation to the primary table.
The problem in nutshell
'p_additionalSoftwares' => array(self::BELONGS_TO, 'Product', 'additionalSoftwares')
Where additionalSoftwares is something like 23,45,68
How can I solve this?
Thanks is advance.
mentel
(Yii)
June 27, 2011, 5:18am
2
You can’t.
Maybe you want to read the guide and about relational databases.
The simplest way is not to use relations at all
You can do it by two subsequent queries.
nguyendh
(Duynguyen0511)
June 27, 2011, 3:25pm
4
It helps if you can show us some tables and pictures to make sure we are thinking the same thing as you do.