Page 2 of 2
Posted: Mon Sep 01, 2003 3:24 pm
by Drachlen
What is time consuming?
Posted: Mon Sep 01, 2003 3:37 pm
by maldar
iteration! and seek in table
Posted: Mon Sep 01, 2003 3:42 pm
by JAM
Nah, it wont be. SQL is extremely fast (there are benchmark testa at MySQL's site), trust us.

Posted: Mon Sep 01, 2003 3:42 pm
by maldar
seek in table frequantly to find user session that has more than x minutes of lifetime to log out them. I want set a certian time to user session and when it expird, automatically log out her/him.but if i do this iteration in table,then there is no time to do other work
Posted: Mon Sep 01, 2003 3:50 pm
by maldar
also if i want it i must do it concurrently and i know that it is impossible...
Posted: Mon Sep 01, 2003 3:52 pm
by maldar
Removed
Posted: Mon Sep 01, 2003 3:58 pm
by m3rajk
hmm.. nope. it's simple.....
mysql_query("SELECT username FROM login_activity WHERE last_activity>(5 min ago)",$db);
umm.. (5 min ago) should be a calculated time
Posted: Mon Sep 01, 2003 11:33 pm
by maldar
I still have problem....
may i have a complete sample code of its implementation.Thanks
Posted: Tue Sep 02, 2003 4:27 pm
by m3rajk
i don't use sessions and haven't implented who's online yet
Posted: Tue Sep 02, 2003 4:31 pm
by maldar
what do you suggest for do it?
Posted: Tue Sep 02, 2003 5:12 pm
by m3rajk
show us what you have and we can try to help you debug
Posted: Wed Sep 03, 2003 3:41 pm
by maldar
Thanks to all
i suggest this way.Do you think it is correct??? and enough useful ?
1)save user entrance time to db
2)on every request from him/her update last activity for that user
3)on every new user login or old user logout check db for find users with no activities and logout them