I'm trying to set a query in my login page thats is automatic deleting user registration that have not activate there account.
here is my query but unfortunately it is not working.
<cfset variables.SqlTimenow ="#DateFormat(now(),"dd/mm/yyyy") & ' ' & timeformat(now(),'h:mm:ss tt')#">
<!--- delete unactvated accounts --->
WHERE activation = <cfqueryparam value="0" cfsqltype="cf_sql_numeric">
AND DateDiff("h",dateregister,SqlTimenow) > <cfqueryparam value="24" cfsqltype="cf_sql_numeric">
I get the error:
Incorrect syntax near the keyword 'user'.
(dateregister is my column with the registration date in form:dd/mm/yyyy h:mm:ss tt
Any idea how to do this?