diff --git a/app/Models/HomeModel.php b/app/Models/HomeModel.php index 46452fe1..59ee8a89 100755 --- a/app/Models/HomeModel.php +++ b/app/Models/HomeModel.php @@ -199,7 +199,7 @@ class HomeModel extends Model DATEDIFF(S.to_subscription, CURDATE()) as countdays, DATE_FORMAT(S.to_subscription, "%d/%m/%Y") as to_subscription_date_format, S.is_renew, - ( NHC.sent_time ) as email_last_notify_on,(select is_renew from subscription as sub where S.sub_id = sub.is_renew LIMIT 1)as renewed') + MAX( NHC.sent_time ) as email_last_notify_on,(select is_renew from subscription as sub where S.sub_id = sub.is_renew LIMIT 1)as renewed') ->where('S.to_subscription >=', $past30days) ->where('S.to_subscription <=', $last30days) ->where('S.isactive', 1)