WordPress.org

Ready to get started?Download WordPress

Forums

meta_query problem (1 post)

  1. spacefolded
    Member
    Posted 1 year ago #

    I need to query some numeric data BETWEEN some values from meta_value ARRAY!!!!

    $start_time=mktime(0,0,0,date("n",time()),date("d",time()),date("Y",time()));
    $finish_time=mktime(23,59,59,date("n",time()),date("d",time()),date("Y",time()));
    $args = array(
       'orderby' => 'meta_value_num',
       'order' => 'ASC',
      'meta_query'=> array(
        array(
          'key' => 'repeat_ends',
          'compare' => 'between',
          'value' => array($start_time,$finish_time),
          'type' => 'numeric'
        )
      )
     );
    $query = new WP_Query( $args );

    REMEMBER THAT MY meta_value IS AN ARRAY of mktime elements!!! time and values in array are correct help me please..

Topic Closed

This topic has been closed to new replies.

About this Topic