Click here to Skip to main content
16,023,224 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created one table which includes user id,name, login time and logout time and status filed

So when a new user logged(clicks on login button) in then it will be inserted into the database and status field will be set to 1 and when he clicks on logout button then status field will be set to zero. And if the user id for example 2002 is already their in the database and not logged in,and when he logged in then only status field will change from 0 to 1.

Till This i have finished with coding and designing


So my Question is i want to display all the users who are logged into the system in some popup message(User Id and password whose status=1 in the database table )
Posted

1 solution

There is no reason you can't pop this up, but the question is where?

Your SQL will look something like:
select count(u.UserId) from users u where u.Status = 1


...and you'll be executing a scalar command.

You can use any method to view the current count, such as:

  • A message box
  • A custom form
  • A task tray icon


The only thing left is to determine who you'd like to see this message. The above options work if you want the user who is logging in to see the user count.

Cheers,
-jc
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900