Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

What's The Correct Structure For This Cactivedataprovider

$
0
0
Hi,

I'm trying to do a join across 3 tables like so:

$model=new CActiveDataProvider('Seller', array(
			'criteria' => array(
			'with' => array('company','items'),
			'condition' => 't.company_id IS NOT NULL AND items.date_expired > CURDATE()'
			)
		));



This fails Column not found: 1054 Unknown column 'items.date_expired'

The Seller Model has both relations, the company model doesn't have an items relation. If that would be the reason?

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>