tags:

views:

28

answers:

1

I have a table in the same database as my wordpress install. What is the correct way of querying it the "wordpress way" ? I know I can use mysqli and that is what I usually do. But I am sure wordpress has it's own standard and perhaps classes to do this.

thanks

+4  A: 

Why not use the wpdb class? There is an example documented on wordpress.org and it goes like this:

$myrows = $wpdb->get_results( "SELECT id, name FROM mytable" );
Steve Finkelstein