tags:

views:

22

answers:

2

Hi all, there is a database of all users in a network,I need to write a query where in when the user logs in.. all the user id's should be displayed in page except his..plzz hlp..thnx

A: 

Not sure what plzz hlp thnx means, but if you want to select all users except the current one, you could use something like

SELECT id FROM members WHERE id <> currentID
Gaby
"Not sure what plzz hlp thnx means", weird, that was the only part of the question I understood...
Abe Miessler
@Abe, *chuckle*
Gaby
A: 

Lex's comment is valid. I will tell you what you'd need if this were an asp.net question: the general principle may help you.

  1. 'When the user logs in' means you have some system where people log in, and, presumably, you can detect this event - like in an asp.net login page.
  2. You then want to show something: this means you probably have the flexibility (in your design / coding) to show it. Say: an asp.net page.
  3. In that case, you can, when the page loads (page_load), get the user id for that user (using membership routines if asp.net) and then use that userid as a parameter
  4. That parameter would be 'currentID' in Gaby's example, for instance.

I could give more detail, but given the general nature of your question, that might be wasted effort at this time.

Tobiasopdenbrouw