//最新评论排第一
function Autofirst($af){
global $wpdb;
$queryaf=“select comment_author, comment_author_url, comment_date from $wpdb->comments where comment_ID in (select max(comment_ID) from $wpdb->comments where comment_approved=’1′ and comment_author_url !=” and user_id=’0′ GROUP BY comment_author_email) ORDER BY comment_date DESC LIMIT $af”;
$wally = $wpdb->get_results($queryaf);
foreach ($wally as $commentaf){
$tmpy= “
comment_author_url.“”>”.$commentaf->comment_author.“”;$outputy .= $tmpy;
}
$outputy = “
- ”.$outputy.“
echo $outputy ;
}