I am working on a WordPress website. I have a MySQL database with data in it. I want to showcase this data on my website (I already have a local PHP page that does what I want).
I have been told that the best way to do this is to create a plugin that retrieves data from the database, but I have no idea how to make one and I can't find any tutorials that involve databases.
Any tips/pointers/links to tutorials are greatly appreciated.
I am working on a WordPress website. I have a MySQL database with data in it. I want to showcase this data on my website (I already have a local PHP page that does what I want).
I have been told that the best way to do this is to create a plugin that retrieves data from the database, but I have no idea how to make one and I can't find any tutorials that involve databases.
Any tips/pointers/links to tutorials are greatly appreciated.
Share Improve this question edited Oct 10, 2019 at 13:27 butlerblog 5,1213 gold badges28 silver badges44 bronze badges asked Oct 10, 2019 at 8:47 Jessica ChambersJessica Chambers 1113 bronze badges 1- I would like to thank the pedants who read my question intently enough to fix my truly horrendous lack of capitalization of proper nouns (that I'm sure must have obscured the meaning of the sentence - one could easily think that I was referring to some kind of fabulous machine that presses words!) but who offer absolutely no advice as to my actual question. God bless you for your invaluable aid, this SE would collapse without you – Jessica Chambers Commented Oct 14, 2019 at 12:05
1 Answer
Reset to default 1To query a second database you can use the wpdb object like explained here.
This can be a local or extern database. You don't need to create a plugin.