I have these three tables
ad has many user
user has one zip_code
I am trying to access a zip_code column with this Active Record query:
$criteria->join = 'inner join user on user.id = ad.user_id inner join zip_code on zip_code.zip_code = user.zip_code ';
$results = ad::model()->with( ‘user’)->findAll($criteria);
when I call:
I don’t get an error, I get nothing, blank.
So, is it possible to access a column in zip_code from ad?