and
PHP Code:
// Newest Ads
$newads_get = $vbulletin->db->query_read("
SELECT classified.classifiedid AS classifiedid, classified.categoryid AS categoryid, classified.userid AS userid,
classified.dateline AS dateline, classified.timeframe AS timeframe, classified.title AS title, classified.price AS price,
classified.type AS type, user.*,
upload.classifiedid, upload.image AS image
FROM " . TABLE_PREFIX . "sr_classifieds AS classified
LEFT JOIN " . TABLE_PREFIX . "sr_classifieds_uploads AS upload ON (upload.classifiedid=classified.classifiedid)
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid=classified.userid)
ORDER BY dateline DESC
LIMIT $newadlimit
");
while($newad = $vbulletin->db->fetch_array($newads_get)){
$newad[dateline] = vbdate($vbulletin->options['dateformat'], $newad['dateline'], '', '');
eval('$newadbit .= "' . fetch_template('sr_classifieds_newadbit') . '";');
}