SQL syntax error – possibly directory.php wpdb code?
-
Immediately upon activation of this plug-in I get this 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 ‘) AND status = ‘active” at line 1 for query SELECT DISTINCT user_id FROM wp_pmpro_memberships_users WHERE membership_id IN () AND status = ‘active’ made by require(‘wp-blog-header.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), WP_Hook->do_action, WP_Hook->apply_filters, pmpro_bp_directory_init, pmpro_bp_get_members_in_directory
Here is the code that I found in includes/directory.php
$sql = "SELECT DISTINCT user_id FROM $wpdb->pmpro_memberships_users WHERE membership_id IN (" . implode(",", array_map("intval", $include_levels)) . ") AND status = 'active'";
Any help how to fix this would be greatly appreciated. I have looked everywhere trying to remedy this, but to no avail.
Thank you.
- The topic ‘SQL syntax error – possibly directory.php wpdb code?’ is closed to new replies.