...

View Full Version : Update Date Field with Last Login Date



efeller
02-28-2007, 02:52 AM
I am trying to update a field to show the last time a user logged in. I'm not receiving any specific error message, however it isn't working. Any suggestions?

Here is my code:

UpdateDateQry="UPDATE tbl_CUSTOMER_CONTACT SET LAST_LOGIN=(GETDATE()) WHERE CONTACT_USERNAME='"&param&"' AND CONTACT_PASSWORD='"&param_p&"'"

The LAST_LOGIN field is set as a datetime field with the default as GETDATE()


---

OK, I figured this out. For those that may need to know. Here is how to do this.

I formatted the LAST_LOGIN field as a datetime field with no default values. I used the same query as above and it worked!

Archangel
02-28-2007, 01:06 PM
SQL or MySQL? And are you sure that param and param_p are actually passing values?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum