Show data from external database
-
Hello,
I’m currently trying to show data from an external database on my wordpress website. I’m not really new to wordpress but this kind of topic is brand new to me, so I’m a little bit lost here.
So I have a database called “persons” with a table “stats_persons” and I want to grab the “lastconnection” (https://i.imgur.com/FJcGRQR.png) which basically contains the data when the person was last online.
I have created a child theme and within the functions.php it currently looks like this:
$wpdb_b = new wpdb(DB_USER, DB_PASS, ‘stats_persons’, ‘external_ip’);
$wpdb_b->get_results( “SELECT * FROM stats_persons” );What would I need to do in order to show “lastconnection” data?
Thank you very much!
- The topic ‘Show data from external database’ is closed to new replies.