Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter srkan

    (@srkan)

    Sorry the correct code is the following:

    $getL1 = $wpdb->get_results("SELECT wp.* FROM $wpdb->posts AS wp, $wpdb->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 1", OBJECT);

    and the error is:

    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 1
Viewing 1 replies (of 1 total)