Using WordPress Database Class to access data

WordPress exposes an instance of a class named $wpdb that lets you access any table within your blog database. The following example gets a row from the users table and print the result as an associative array.

Leave a Reply