This is part of the aw blog module. I have 2 tables.
aw_blog
post_id | tags
1 tag1
2 tag2
3 tag3
aw_blog_post_cat
cat_id | post_id
1 1
1 3
2 3
I have that SQL statement and i am trying to do it with magento way:
SELECT `aw_blog`.`tags` FROM `aw_blog_post_cat` RIGHT JOIN `aw_blog` on `aw_blog`.`post_id`=`aw_blog_post_cat`.`post_id` WHERE `aw_blog_post_cat`.`cat_id`=1
I tried something like that:
$collection = Mage::getModel('blog/blog')->getCollection()
->getSelect()->joinRight(array("post_cat" => $this->getTable('aw_blog_post_cat')), 'main_table.post_id = post_cat.post_id', array());
from that link
But with no luck.
There is no model implemented for aw_blog_post_cat
table