Equ
(Spamhouse)
1
I’m trying to get a comment id (suppose there is only one comment to that certain post) from post view shop.php (demo blog). I tried this
<?php print $model->comments->id; ?>
but unfortunately it didn’t work. The relations are set in post model
'comments'=>array(self::HAS_MANY, 'Comment', 'postId'),
Any suggestions how to get this data?
Thank you.
tri
(tri - Tommy Riboe)
2
‘comments’ will be an array
<?php print $model->comments[0]->id; ?>
/Tommy