I just came across this in a search and thought I’d reply just in case you didn’t figure this out.
I’m not 100% sure the best way to go about this but I can provide some information that may be helpful.
$wpdb has both prefix and base_prefix members, so you can get the ‘wp_4_’ by referencing $wpdb->prefix and making use of that in your query.
Given what you have you can do a string replace on $postmeta_table and $posts_table so that if they are set to wp_ instead of your prefix (in this case ‘wp_4_’) then replace it and run your query.
It would be something like:
global $wpdb; // Must have this or else!
$postmeta_table = $wpdb->postmeta;
$posts_table = $wpdb->posts;
$postmeta_table = str_replace($wpdb->base_prefix, $wpdb->prefix, $postmeta_table);
$postmeta_table = str_replace($wpdb->base_prefix, $wpdb->prefix, $postmeta_table);
$wpdb->query("DELETE FROM " . $postmeta_table . " WHERE meta_key = '_mrlpt_client_email'");
$wpdb->query("DELETE FROM " . $postmeta_table . " WHERE meta_key = '_mrlpt_client_phone_num'");
$wpdb->query("DELETE FROM " . $posts_table . " WHERE post_type="mrlpt_client"");
Again, I’m not sure this is the best way to do it but it should get you to where you are trying to go.
References: