Fixed Duration Weekly, Monthly and Daily Accounts

Fajar A. Nugraha list at
Fri Nov 11 22:48:24 CET 2011

On Sat, Nov 12, 2011 at 2:43 AM, JennyBlunt <jennyshoehorn at> wrote:
> I'm looking at your query and am a bit lost as to what I should use for the
> attributes.
> Say I wanted 24 hour voucher - expires exactly 24 hours after first login. I
> need to give the user some attribute in the db of 86400 seconds - for
> example I'll call this Access-Duration

You can't. It's not a valid attribute.
You use existing Expiration instead, where

Expiration = now() + whatever-value-you-want-for-the-account-to-be-valid

There are of course additional details, like what the format of
Expiration attribute should be (e.g. using 2011-11-11 won't work),
and how to do the actual addition (simply using "+" in mysql won't

Hint: try
. Should be easy enough, but might take several hours of trying to get
the correct syntax right. If you're still confused, hire an
experienced mysql developer to help you out.


More information about the Freeradius-Users mailing list