I’ve manually setup a new table in the wp-db
database. Where do I add the name of this table in the wpdb
class or anywhere else?
I’ve noticed that WordPress uses queries like:
$user_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->users" );
where the actual table name isn’t used.
If I were to do:
$user_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->friends" );
it will not work.
I also tried adding the name like var $friends;
inside the wpdb
class, but that would not work.