Using AND and bracket grouping in SQL not working

You need 2 table joins since there are effectively 2 meta keys in your WHERE clause: SELECT DISTINCT SQL_CALC_FOUND_ROWS wp_users.* FROM wp_users INNER JOIN wp_usermeta AS um1 ON (wp_users.ID = um1.user_id) INNER JOIN wp_usermeta AS um2 ON (wp_users.ID = um2.user_id) WHERE (wp_users.user_login LIKE ‘%little%’ OR wp_users.user_email LIKE ‘%little%’ OR wp_users.user_url LIKE ‘%little%’ OR wp_users.display_name LIKE … Read more

Error missing MySQL extension

The solution to this will require server level changes, this isn’t something you can fix by changing PHP files. Your host needs to install the mysqli PHP extension

Most commented posts by time period (last 12h, last 24h and etc)

So if you want to get the posts that were commented within the last xx hours, e.g. 12 hours, then try one of the following: Note though, I’m selecting only published posts (post_status=”publish”) and of the post type (post_type=”post”). And just replace the value of $hours with your preferred number of hours. Using TIMESTAMPDIFF(). $hours … Read more

Match tag names with form titles

I don’t see PHP syntax errors (like unwanted brackets) in your code, but there are two WordPress-specific issues that need to be fixed: Note that wpdb::prepare() needs one or more placeholders (e.g. %s for strings and %d for numbers) and the replacement value for each placeholder. So in your case, the correct $wpdb->prepare() would be: … Read more

WordPress doesn’t save changes some times

You are mentioning the mysqldump, and it might be linked to the problem. If your mysqldump takes long time, and lock tables, it might cause the requests to your server when tryig to save posts, to time out. It could also just be a plugin that is messing something up, server-side settings that have errors … Read more