Jump to content

query!


knowledgehungry

Recommended Posts

hi Good Morning,how can i know which user is currently logged in. that is , like in this web foroum we can see the particular number of user or guest reading the particular query. how can make this happen in my application where i want to know that which of the user are currently logged into my application?

Link to comment
Share on other sites

what this forum does is everytime you click a link it logs in the database the time of the click and where that click took you. Then for the stats at the bottom it just reads the table that logs the clicks and pulls out everything within the last 15 minutes and calculates the numbers you see there.

Link to comment
Share on other sites

what this forum does is everytime you click a link it logs in the database the time of the click and where that click took you. Then for the stats at the bottom it just reads the table that logs the clicks and pulls out everything within the last 15 minutes and calculates the numbers you see there.
can u explain it programatically. PLease.
Link to comment
Share on other sites

on every Page_Load() you would have to log the page url in the database record for the user along with DataeTime.NowThen when you are building your Who is online code you would use a query like this

select UserName from tblUsers where DATEDIFF(minute,UserDateTimeColumn,GetDate()) < 16

then you just display the result as you want.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...