Question: how to wpdb in wordpress?
Answer: Using the $wpdb global object # WordPress provides a global object, $wpdb , which is an instantiation of the wpdb class. By default, $wpdb is instantiated to talk to the WordPress database. $results = $GLOBALS [ 'wpdb' ]->get_results( "SELECT * FROM {$wpdb->prefix}options WHERE option_id = 1" , OBJECT );