Simply,
When a user logs in, I want their "Last Login" to update to the current date. By using previous threads examples, I have he following query
<cfset CurrentDate = DateFormat(Now(), "yyyy/mm/dd"
>
<cfquery name="db_insert" datasource="dbname" dbtype="ODBC" username="username" password="pswd" dbserver="localhost" dbname="dbname">
UPDATE users SET last=#CurrentDate# where id=#id#
</cfquery>
last = the date (no time) field in
When a user logs in, it properly shows the current date as the last login, but if you refresh this, that user's last login has become 0000-00-00, and it returns an error.
Guessing CreateODBCDate needs to be here somewhere? Didn't in previous examples, but then again..
When a user logs in, I want their "Last Login" to update to the current date. By using previous threads examples, I have he following query
<cfset CurrentDate = DateFormat(Now(), "yyyy/mm/dd"
<cfquery name="db_insert" datasource="dbname" dbtype="ODBC" username="username" password="pswd" dbserver="localhost" dbname="dbname">
UPDATE users SET last=#CurrentDate# where id=#id#
</cfquery>
last = the date (no time) field in
When a user logs in, it properly shows the current date as the last login, but if you refresh this, that user's last login has become 0000-00-00, and it returns an error.
Guessing CreateODBCDate needs to be here somewhere? Didn't in previous examples, but then again..