WPDB prepare – like % – placeholders?

Yes, they’re normal. They were added in 4.8.3 to fix an SQL injection vulnerability. You can read an article describing the technical reasons for this happening here and the ticket for the change here. The placeholder characters are replaced by the random characters on the last line of $wpdb->prepare() with the $wpdb->add_placeholder_escape() function, which calls … Read more

$wpdb:insert, more arguements in $format array than in $data

I think you’re assuming this is intentional, it’s probably just a bug in the theme, what it’s stating is the 5th parameter is a string, but there is no 5th parameter so it’s ignored. The most likely reason is that during development a 5th entry was removed and the author forgot to update the second … Read more

Get count of rows based if column exists in two different tables

You need to use a join in your mysql query. Something like this might get you closer… global $wpdb; $rsvp_table = $wpdb->prefix . ‘rsvp’; $invites_table = $wpdb->prefix . ‘invites’; $sql=”SELECT COUNT(*) as count FROM $invites_table i1 JOIN $rsvp_table r1 ON (r1.reference = i1.reference)”; $yet_to_respond = $wpdb->get_results( $sql ); echo $yet_to_respond->count;

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)