判断用户今天生日(表中字段存的格式是年月日) --- 2018-06-14

$today = date('m-d');

$where = [

    'right(user_birthday, 5)' => $today, //今天生日

    // 'user_status' => 0,

    'record_status' => 0,

];

$users = Db::name('user_info')

    ->where($where)

    ->field('id,user_name,system_flag,user_birthday')

    ->select();

你可能感兴趣的:(判断用户今天生日(表中字段存的格式是年月日) --- 2018-06-14)