基于日期的MySQL查询[关闭]

I need a help with an sql statement. i have a featured user system based on 'likes', but once a user has been 'featured', they cannot be featured for the next 30 days. this has been written completely in php/mysql. any ideas?

Pseudo code on the php side:

     $new_date = new DateTime;         
     $new_date->modify('30 day'); //set the next time they can be featured to 30 days in the future   

     while ($row = $qryResult ->fetch_assoc()) { //query table containing user, featured yes/no, date, etc
        $featured_date = new DateTime($row['featuredDate']);

     if ($featured date < $new_date) {
         echo $row['user'];
    }
  }