Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6140153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:04:50+00:00 2026-05-23T18:04:50+00:00

I have this mySQL syntax which updates the table users and column skills_mod_time every

  • 0

I have this mySQL syntax which updates the table users and column skills_mod_time every time the page is reloaded. $sql = "UPDATE users SET skills_mod_time = CURRENT_TIMESTAMP";

How can i change from instead of using the CURRENT_TIMESTAMP to using a counting timestamp.
For example the column skills_mod_time is defaulted as 0. If the page was reloaded 10 sec later, i want the seconds part to be 10. Instead of the current way where it changes 0 to this present time.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:04:51+00:00Added an answer on May 23, 2026 at 6:04 pm

    It sounds like you want to log “seconds since login”, or something similar, rather than “last activity.” To do this, you should create a column called login_time, or similar, and only update it when a user logs in. You probably still want to track the last-activity time, as you do now, for the purpose of session expiry.

    Then if you have these two columns, login_time, and last_activity, you can get the seconds between login_time and last_activity by subtracting the one from the other. Or you can get the time since login by subtracting login_time from NOW().

    I hope this answers your question–if not, please clarify your question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

(Note: This is for MySQL's SQL, not SQL Server.) I have a database column
This is for MySQL and PHP I have a table that contains the following
This is the MySQL table structure that I have: itemID (BIGINT) userID (BIGINT) wasAdded
I have a MySQL query like this: SELECT *, SUM(...some SQL removed for brevety)
I have an ISAm table in mySql that was created similar to this: create
I'm creating a Rails application which uses MySQL. I have a table in my
Say I have this two-column table id | column_test 1 | NULL 2 |
I have a table in mysql called advertisements, in which there is an entity
I have a database filled with records and by using this MySQL-syntax: public static
I have some problem converting a MYSQL query to CI syntax. This my MySQL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.