WordPress - tap into MySQL connection
What 开发者_Go百科variable is used for the database connection instance in WordPress?
PS: I would be wanting to use the variable from the template.
$myrows = $wpdb->get_results( "SELECT id, name FROM mytable" )
Please refer this link
http://codex.wordpress.org/Function_Reference/wpdb_Class
精彩评论