Support » Fixing WordPress » Data compare

  • 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.

  • The topic ‘Data compare’ is closed to new replies.