Basically, there are no built-in methods for accessing custom tables using direct functions, so it's a must to use the wpdb class for handling custom tables. Let's take a look at some of the functions provided by the wpdb class:
- $wpdb->get_results( "select query" ): This can be used to select a set of records from any database table.
- $wpdb->query('query'): This can be used to execute any custom query. This is typically used to update and delete statements instead of select statements, as it only provides the affected rows count as the result.
- $wpdb->get_row('query'): This can be used to retrieve a single row from the database as an object, an associative array, or as a numerically indexed array.
A complete list ...