Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Oct 2003
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Update Date Field with Last Login Date

    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!
    Last edited by efeller; 02-28-2007 at 04:00 AM. Reason: I figured it out!

  • #2
    Registered User
    Join Date
    Jan 2006
    Posts
    130
    Thanks
    0
    Thanked 0 Times in 0 Posts
    SQL or MySQL? And are you sure that param and param_p are actually passing values?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •