MySQL Query not working…
-
I have successfully inserted data into a custom table using the method in the Function Reference but now I am having a problem retrieving the data and displaying it in a template page.
Here is the code that I used.
<?php $x = $wpdb->get_results("SELECT * FROM $wpdb->custom_table"); foreach ($x as $y) { echo $y; } $wpdb->show_errors(); ?>
I get no results from this query just a blank page… Am I doing something wrong?
Thanks.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘MySQL Query not working…’ is closed to new replies.