Skip to content

Instantly share code, notes, and snippets.

@nikitasinelnikov
Created February 21, 2024 22:06
Show Gist options
  • Save nikitasinelnikov/74b1810a1d1bb30586fa6fdfb44e122e to your computer and use it in GitHub Desktop.
Save nikitasinelnikov/74b1810a1d1bb30586fa6fdfb44e122e to your computer and use it in GitHub Desktop.
Get dumped data
add_action( 'init', 'my_custom_init' );
function my_custom_init() {
if ( isset( $_GET['check_lifeguard'] ) && '1' == $_GET['check_lifeguard'] ) {
global $wpdb;
$meta_results = $wpdb->get_results(
"SELECT um.*
FROM {$wpdb->usermeta} um
WHERE um.user_id IN('1736','1251')",
ARRAY_A
);
$users_results = $wpdb->get_results(
"SELECT u.*
FROM {$wpdb->users} u
WHERE u.ID IN('1736','1251')",
ARRAY_A
);
var_dump( $users_results );
var_dump( $meta_results );
exit;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment