Re: doubt of join in cakephp

2012-03-28 Thread LITTO CHACKO
hello,guys i got amuch perfect logic fro our cakephp buddy rodigreas.. he ask me to link from offerpromo table to offer..and use belongs to condition and i write it like this:- function getallhot(){ $this->belongsTo= array('Offer'=>array('className'=>'Offer','foreignKey'=>'o

Re: doubt of join in cakephp

2012-03-28 Thread Loren Cole
There's a pretty good example of a join here . Essentially you want to do something like $records = $this->offerpromo->find('all', array( 'conditions' => array('Offerpromo.end_date <' . date()),

doubt of join in cakephp

2012-03-28 Thread LITTO CHACKO
Hello, i have a doubt regarding join in cakephp. i have a primary key which is a foreign key of other table... i want to retrieve the table along with values s in othertable by checking some condition sin two tables. fields in first table:- db_offer offer_idseller_id pack