perochak
(Amjad Mughal)
October 28, 2011, 10:15am
1
Hi All,
I want to create a search model using CActiveRecord.
Can I use more then one tables for this?
Class Search extends CActiveRecord{
function tableName(){
return array('tbl1','bl2'); // is like this possible?
}
}
Is there any other method that can be used?
l.jurgs
(L Jurgs)
October 28, 2011, 11:52am
2
CActiveRecord represents a single tuple (row) in a table. I would personally create a class that better represents what you are trying to abstract. I’m not certain what that is but I think your trying to get a square peg in a round hole here.
grigori
(Public)
October 28, 2011, 3:05pm
3
it is called "Relational Active Record"
perochak
(Amjad Mughal)
October 29, 2011, 5:41am
4
Thanks.
I think, what I should do is
As we are searching the database and we will include a set of tables that needs to be searched with selected values/columns, so
1 - Create Relations of the table with concerned tables
2 - Use Compare feature to get the list of items from each of the table
3 - Remove Duplicate Items
4 - Display them
Thanks for all.