Panos
asked on
Set the remaining time in -datediff in coldfusion
Hello experts
I have a users table with dateregister column (in datetime format).
A registered user has 24 hours to activate his account.
When he is trying to login without having activated his account i want to show him what time he has left to activate it or else his account will be deleted.
I have the query:
<cfquery name="CheckPersonAct" datasource="#request.dsn#" >
SELECT Password, email, user_ID ,Activation, user_uuid,dateregister
FROM users
WHERE email = <cfqueryparam value="#Form.lemail#" cfsqltype="CF_SQL_VARCHAR" >
AND Password = <cfqueryparam value="#VARIABLES.hashedPa ss#" cfsqltype="cf_sql_varchar" >
AND Activation = <cfqueryparam value="0" cfsqltype="cf_sql_numeric" >
</cfquery>
I have a users table with dateregister column (in datetime format).
A registered user has 24 hours to activate his account.
When he is trying to login without having activated his account i want to show him what time he has left to activate it or else his account will be deleted.
I have the query:
<cfquery name="CheckPersonAct" datasource="#request.dsn#"
SELECT Password, email, user_ID ,Activation, user_uuid,dateregister
FROM users
WHERE email = <cfqueryparam value="#Form.lemail#" cfsqltype="CF_SQL_VARCHAR"
AND Password = <cfqueryparam value="#VARIABLES.hashedPa
AND Activation = <cfqueryparam value="0" cfsqltype="cf_sql_numeric"
</cfquery>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
regards
panos