Custom queries
-
Hi
I am relatively new to wordpress, and for a job I’m doing for a client a custom plugin is required.
I’m doing a test query but I don’t know if I’m doing it right, I just cant get my head round the $wpdb and the codex solutions aren’t helping either.
Basically all I want to do at this stage is pull results out of a custom table, to no avail. Here’s the code I tried…
// Get the ranges from the database $range_rows = $wpdb->get_results("SELECT * FROM wp_hb_ranges ORDER BY id DESC"); foreach ($range_rows as $range_row) { echo $range_row->name; }What am I doing wrong?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Custom queries’ is closed to new replies.