hi edison thanks for the reply..
If I change the "months_expire" to "months_expire days"
the variable been only changed, how those computations/formula itself?
Another:
how to alter the column, i'm new with this code, not active enough
to do such programming...
thanks
-jong
>>$query = "SELECT months_expire ".
>> "FROM radius_user ".
>> "WHERE username = '$username' AND ".
>> "(date_firstlogin = NULL OR ".
>> "date_expiration = NULL)";
>> $result = $conn->exec($query);
>> if ($result->ntuples > 0) {
>> my $months_expire = $result->getvalue(0, 0) || 0;
>> $query = "UPDATE radius_user ".
>> "SET date_expiration = DATE(NOW()) + INTERVAL('$months_expire
months'), ".
>> "date_firstlogin = DATE(NOW()), ".
>> "card_status = 'A' ".
>> "WHERE username = '$username'";
>> $result = $conn->exec($query);
On Thu, 21 Apr 2005 13:27:19 +0800, Edison Cala wrote
> hi jong!
>
>
> one way for you to set the free use within offpeak is to set the
> offpeak discount to 100%. you need to write another line of code to
> perform this checking (edit qn_auth and qn_acct). you need also to
> alter the column size, validate or something. just look into the sql
> file -> offpeak.
>
> on the expiration, edit qn_acct (under update first login/expiration)
> . and change ...CAST('$months_expire months' ....) into
> ...CAST('$months_expire days' .....).
>
> i am using Postgresql 8.0.1 on FC3 system.
>
> goodluck!
>
> edison cala
> http://edison.abeponline.net
>
_______________________________________________
quick-r mailing list
quick-r@???
http://lists.q-linux.com/mailman/listinfo/quick-r