![]() |
Getting a wordpress mysql db error. Help anyone?
This is the error code..and believe me you I don't understand mysql for shit.
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 '-3' at line 1] SELECT DISTINCT * FROM wp_posts LEFT JOIN wp_post2cat ON (wp_posts.ID = wp_post2cat.post_id) WHERE 1=1 AND (category_id = 2) AND post_date_gmt <= '2006-02-10 16:58:59' AND (post_status = "publish" OR post_author = 1 AND post_status != 'draft' AND post_status != 'static') AND post_status != "attachment" GROUP BY wp_posts.ID ORDER BY post_date DESC LIMIT 0, -3-3 Thanks for any help you can offer. |
what are you doing to get the error?
|
Quote:
Yeah . . . add a plugin, SE friendly permalinks . . . what? |
Quote:
|
Quote:
|
Quote:
|
You have an error in your SQL syntax.
ok, seriously.. for some reason you have -3 -3 in there that probably shouldn't be. Can't tell without seeing the code. Could be the design that interfered with the php code. |
Quote:
That would be my first guess |
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
I think the problem is in the Inner Join statement.
JOIN wp_post2cat ON (wp_posts.ID = wp_post2cat.post_id) Doesn't make sense to join the catagory id on the post id. Should be catagory ID on Catagory ID. Also, only use one set of quotes. " or ' . Don't mix and match them. they always give headaches. |
| All times are GMT -7. The time now is 03:10 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123