I have a table with data that I would like to display in various areas of my blog. I'm having difficulty with figuring out how to get the data from the mysql database to my site. I've tried creating a custom function in my theme file but I seem to get errors when I try and change the database. How can I get data from the database and be able to display it in posts and pages? Do I need to create custom functions to send my own queries?