I want to run a SELECT query on the WordPress database and get the results on the screen.
Any widget which does it?
Leave a Reply
You must be logged in to post a comment.
I want to run a SELECT query on the WordPress database and get the results on the screen.
Any widget which does it?
You must be logged in to post a comment.
Have a look at the $wpdb class, it does exactly what you want:
Try to avoid SQL queries for basic operations though. WordPress offers you many convenience functions for 80% of the tasks you would every come up with. They provide a nicer interface and preserve upwards compatibility.
For example to get posts from the DB you could use the WP_Query class or the get_posts() function.