Support » Fixing WordPress » View comments shows 303 instead 3, 101 of each kind.

  • Resolved Mysmasken

    (@mysmasken)


    Hi, my view_comment has been working fine, but not anymore.
    This is how my query looks:

    $queryn = mysql_query (“SELECT count(*) FROM $wpdb->comments WHERE user_id = $user_ID AND comment_approved = ‘1’”);
    $antal = mysql_result($queryn,0);
    $comments = $wpdb->get_results(“SELECT * FROM $wpdb->comments wcomments, $wpdb->users wusers WHERE wcomments.user_id = $user_ID AND
    wcomments.comment_approved = ‘1’ ORDER BY wcomments.comment_date DESC LIMIT $offset,$antal”);

    So on the profile I’m looking at there are 3 posted comments. If it looks like this it will show me 3 of the same post. If I remove ” LIMIT $offset,$antal” at the end it will give me 303 posts, 101 of each kind. Not 1,2,3,1,2,3,1,2,3,1,2,3… but first 101 of one kind, then the next kind.

    Can anyone figure out what I’m doing wrong?
    For the rest of the file it’s pretty much a rip-off of edit_comments.php, except that the editorial parts are removed.

  • The topic ‘View comments shows 303 instead 3, 101 of each kind.’ is closed to new replies.