WordPress.org

Ready to get started?Download WordPress

Forums

Data compare (1 post)

  1. macgregor1314
    Member
    Posted 2 years ago #

    I know it's probably easy, but it's very frustrating. Ihave this filter, which works:

    function filter_where($where = '') {
        $where .= " AND post_date >= '2012-01-08'";
      return $where;
      }

    But i can't make a simple substitution, like

    $weekago='2012-01-08';
    
     $where .= " AND post_date >= $weekago;"

    which is driving me nuts.
    I've tried

    $weekago='2012-01-08';
    $weekago="'" . $weekago . "'";

    but still doesn't work.

Topic Closed

This topic has been closed to new replies.

About this Topic