include 2 diff dbs in plugin function
-
I have a function and am rewriting it to be portable. My functions is calling 2 db tables, 1st it calls the db table in my DB.userdb then is to call the wordpress wp_users table.
In my function I gave global $config, $wpdb;
then I select * from my $config[table_prefix]usersdb
I then want to loop through the results to match values in my wordpress wp_users table.I have to use DB_name.wp_users in my second select to get it to work. I cannot get $wpdb->prefix.”users” to work it is only outputting the wp_users and it needs to include the DBname also.
Can anyone tell me what I am missing?
Trying to do a quert from two different DBs without having to hard code either of the 2 db names in the select statements
- The topic ‘include 2 diff dbs in plugin function’ is closed to new replies.