I have a website, in that i start time after user login, and when i stop the timer I save this time in database, And i have two tables
login
----------------------
id | username | password
table
---------------------------------------------
user_id(referenced by id) | t_id | date | time
So, With this database structure i got multiple entry in database when i logout, So plz tell me about proper database structure for storing the time datewise and for one date only one entry allowed.
If there are any suggesion for re-design database structure then plz suggest me.
i want to merge the time in database, when i logout the multiple time in single day...
table
---------------------------------------------
user_id(referenced by id) | login_date (datetime field) | logout_date (datetime field)
If So then store Login time and logout time in the table .Find the difference of all log outs and logins in the current date and finally sum up all the differences if it is greater than or equal to 9 disable login function