• I’m getting a database error on ‘nicer archives’ when I activate Ryan Boren’s ‘Custom Posts Per Page’ plugin.

    specifically:

    WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '-1' at line 1]
    SELECT DISTINCT * FROM wp_posts WHERE 1=1 AND post_date_gmt <= '2005-04-08 22:34:59' AND (post_status = "publish") GROUP BY wp_posts.ID ORDER BY post_date DESC LIMIT 0, 5-1

    Is some reason why this would be bonkers?

    I’ve got them working happily together on a 1.3b site, but it’s not working on 1.5

Viewing 1 replies (of 1 total)
  • Try editing the postsperpage.php file. Find this line:

    $query_string = preg_replace("/posts_per_page=[0-9]*/", "posts_per_page=$num", $query_string);

    and try making it:

    $query_string = preg_replace("/posts_per_page=-?[0-9]*/", "posts_per_page=$num", $query_string);

Viewing 1 replies (of 1 total)
  • The topic ‘MYSQL Errors with Ryan’s ‘Custom Posts Per Page’ and ‘Nicer Archives’’ is closed to new replies.