Expiration email

john decot johndecot at yahoo.com
Wed Dec 7 05:23:00 CET 2011


thanks Fajar, Let me give a try.



________________________________
 From: Fajar A. Nugraha <list at fajar.net>
To: john decot <johndecot at yahoo.com>; FreeRadius users mailing list <freeradius-users at lists.freeradius.org> 
Sent: Tuesday, December 6, 2011 6:38 PM
Subject: Re: Expiration email
 
On Tue, Dec 6, 2011 at 7:22 PM, john decot <johndecot at yahoo.com> wrote:
> Thanks for the reply. I am also trying same but couldn't compare with the
> field on the database as Expiration attribute use character value. I wish
> someone give me any idea on comparing those parameter inside database.

Several ways I can think of (completely untested):
(1) Use http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_str-to-date
(or whatever equivalent function in your db) to convert the column to
date before comparison

(2) Pick a time to alert the user (e.g. ONE WEEK before expiration),
then use whatever programming language of your choice (e.g. php) to
convert the date into the format used in expiration attribute (e.g.
using date_format). Then you only need to compare for exact string
match.

-- 
Fajar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20111206/0c0b9491/attachment.html>


More information about the Freeradius-Users mailing list