LIMIT -1 coughing up error now for some reason…
-
The code:
$posts = get_posts("category=7&orderby=post_title&order=asc&numberposts=-1");
The error:
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 , wp_post2cat WHERE post_date <= '2006-08-17 01:25:05' AND (post_status = 'publish') AND wp_posts.ID = wp_post2cat.post_id AND wp_post2cat.category_id = 7 GROUP BY wp_posts.ID ORDER BY post_title asc LIMIT 0,-1The mystery:
Everything was working 100% fine and then I went on vacation… no changes were made, and suddenly anywhere I had a LIMIT -1 thrown in, wordpress began spitting errors. Any ideas here?
- The topic ‘LIMIT -1 coughing up error now for some reason…’ is closed to new replies.