internal server error processing $wpdb query results
-
I am running the below code and getting an internal error, logs show nothing, if i replace
echo $discipline;
withecho 1;
it works. what am i doing wrong? this is for an ajax call back.function get_ajax_disciplines(){ global $wpdb; $sql = "SELECT DISTINCT meta_value FROM wpau_postmeta wpm INNER JOIN wpau_posts wp ON wp.ID = wpm.post_id AND wp.post_status = 'publish' WHERE wpm.meta_key = 'post_discipline' AND meta_value NOT LIKE 'a:%' AND meta_value NOT LIKE '%|%' AND TRIM(meta_value) != '' AND meta_value IS NOT NULL ORDER BY meta_value ASC"; $disciplines = $wpdb->get_results($sql); foreach( $disciplines as $discipline){ echo $discipline; } }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘internal server error processing $wpdb query results’ is closed to new replies.