retrieving database data not working
-
I have a couple of custom database table rows added to the normal wordpress database, however, despite having stuff in the database, nothing is been displayed.
After numerous attempts to display the data, I scaled back the code to just this to see what was going wrong and why nothing was working right.
global $wpdb; $data = $wpdb->get_results("SELECT * FROM customtable"); print_r($data);All this produces on the page is
Array()The code above is placed inside a page template. There are no functions to call upon, and no plugins either. No previous database calls other than what WordPress already does. It’s as if the data doesn’t exist, which it does.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘retrieving database data not working’ is closed to new replies.