$wpdb error but without description
-
I have the WordPress 2.5 installed in my server.
I’ve inserted the following code in my template
$getL1 = $wpdb->get_results("SELECT wposts.* FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta WHERE wposts.ID = wpostmeta.post_id AND wpostmeta.meta_key = 'nivelChamada' AND wpostmeta.meta_value = 'L1' AND wposts.post_status = 'publish' AND wposts.post_date <= NOW() ORDER BY wposts.post_date DESC LIMIT 1", OBJECT);but when I get a preview in template, I have the following error:
WordPress database error: [] SELECT wp.* FROM wp_posts AS wp, wp_postmeta AS wpm WHERE wp.ID = wpm.post_id AND wpm.meta_key LIKE 'nivelChamada' AND wpm.meta_value LIKE 'L1' AND wp.post_status LIKE 'publish' AND wp.post_date <= NOW() ORDER BY wp.post_date DESC LIMIT 1What can be it?
I have the same query in the same template and in the same WordPress version (2.5) and it’s working.
Anyone can help me? Please?
Tks
Kan Ishigami
The topic ‘$wpdb error but without description’ is closed to new replies.