Question
problems with application.cfc
in my application.cfc i have the following code in my
onSessionStart function:
<cfscript>
Session.started = now();
</cfscript>
then in my onSessionEnd i have the following:
<cfquery datasource="#application.dsn#">
UPDATE users
SET lastLogin = #CreateODBCDateTime(session.Started)#
WHERE username = '#session.auth.username#'
</cfquery>
<CFOUTPUT><br>Database Updated - Last Login #CreateODBCDateTime(session.Started)#<br></CFOUTPUT>
so the idea is that when the session begins, session.started stores the date/time. then when the session ends, the session start date/time is written out to the database as the "lastLogin" field.
problem is that i am not getting any errors and the value in the database is not being updated.
any suggestions?
<cfscript>
Session.started = now();
</cfscript>
then in my onSessionEnd i have the following:
<cfquery datasource="#application.dsn#">
UPDATE users
SET lastLogin = #CreateODBCDateTime(session.Started)#
WHERE username = '#session.auth.username#'
</cfquery>
<CFOUTPUT><br>Database Updated - Last Login #CreateODBCDateTime(session.Started)#<br></CFOUTPUT>
so the idea is that when the session begins, session.started stores the date/time. then when the session ends, the session start date/time is written out to the database as the "lastLogin" field.
problem is that i am not getting any errors and the value in the database is not being updated.
any suggestions?