0

I'm using a plugin that failed after upgrade to wp3.2.

The error log shows:

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 '' at line 1 for query SELECT post_id, meta_value, post_status FROM bxxoai_postmeta LEFT JOIN bxxoai_posts ON post_id=bxxoai_posts.ID WHERE post_status='publish' AND meta_key='wpfp_favorites' AND meta_value > 0 ORDER BY ROUND(meta_value) DESC LIMIT 0, made by require, require_once, include, get_header, locate_template, load_template, require_once, get_sidebar, locate_template, load_template, require_once, wpfp_widget_view, wpfp_list_most_favorited

mysql version I used is 5.0.92-community

I'm clueless with database, can anyone please teach or help explain to me what needed to be done to fix this?

2
  • What plugin caused this error? Commented Jul 11, 2011 at 3:47
  • wp-favorite-post, only specific to how it handles the query to get the most favorited list Commented Jul 12, 2011 at 8:50

2 Answers 2

1

I ran into this as well... I am using the SQL query, but not the wpfp_list_most_favorited() function, so this may or may not work for you, but worth a shot. Try updating the SQL query in wp-favorite-posts.php (around line 206) from:

$query = "SELECT post_id, meta_value, post_status FROM $wpdb->postmeta";

To:

$query = "SELECT post_id, meta_value, meta_key, post_status FROM $wpdb->postmeta";

Hope this helps!

1
  • only upvoted before, now the checkmark. Thank you. Commented Aug 2, 2011 at 8:06
0

If you can log in to your WP Admin, remove the plugin from there. Otherwise, go through FTP and remove the offending plugin through wp/wp-content/plugins/

After removing, your site should run properly without the error.

1
  • thanks but no thanks. My question is specific to need sql syntax help, not to dump the plugin completely. Commented Jul 12, 2011 at 8:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.