Expiration email

Fajar A. Nugraha list at fajar.net
Tue Dec 6 13:53:44 CET 2011


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




More information about the Freeradius-Users mailing list