CRUD operations using WordPress database API

Querying in WordPress is done by using the the wpdb variable. Be sure to always prepare your sql so WP can make it database safe.

Example:

global $wpdb;
$rows = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM `{$wpdb->prefix}TABLE_NAME` WHERE `var` = %d", 1) );

Then you can loop through the data and output it as for example a table (table formatting not included).

foreach($rows as $row) 
{
  echo $row->post_title;
}

Please note that the SQL query above doesn’t work because it contains dummy data. Please change it so it fits your needs.