|
saboaua
4 posts Location: n.a. |
03.06.2010 13:15Mod Horizontal 5 ADS TricksI want for the mod horizontal to display the latest 5 from the categories that i want, forexample instead of the normal latest 5 ad it will show the latest 5 cars ads.
Who could help me with this? I know the RAND trick already, but want to go one step further.
$database->setQuery( "SELECT a.id, a.category, a.ad_headline, a.ad_type, a.ad_image, a.flag_top, a.flag_featured, a.flag_commercial, date_format( a.date_created, '%d.%m.%Y' ) AS af_date, b.name
FROM #__marketplace_ads AS a, #__marketplace_categories AS b
WHERE a.ad_image > 0 AND b.published = '1' AND a.category = b.id AND a.published = '1'
ORDER BY RAND() DESC LIMIT ".$iCountAds );
|