Edit Comments paging fix from nbachiyski. fixes #3481

git-svn-id: https://develop.svn.wordpress.org/trunk@4649 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2006-12-18 00:13:16 +00:00
parent 925cdbebd1
commit 9c222d2be4
1 changed files with 1 additions and 2 deletions

View File

@ -90,9 +90,8 @@ if (isset($_GET['s'])) {
else
$page = 1;
$start = $offset = ( $page - 1 ) * 20;
$end = $start + 20;
$comments = $wpdb->get_results( "SELECT * FROM $wpdb->comments WHERE comment_approved = '0' OR comment_approved = '1' ORDER BY comment_date DESC LIMIT $start, $end" );
$comments = $wpdb->get_results( "SELECT * FROM $wpdb->comments WHERE comment_approved = '0' OR comment_approved = '1' ORDER BY comment_date DESC LIMIT $start, 20" );
$total = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '0' OR comment_approved = '1'" );
}
?>