Jump to content

Spot the difference


master82

Recommended Posts

I have a table that consists of 6 fields

 

tableid - unique auto incremental value

code - a code given to each user

userid - the unique id of the user

time - unix timestamp of when the code was issued

ip - the ip of the user when code was issued

status - small description of why the code was given

 

Now what I need to do is identify all the userids that appear with the same code only and list them, so that i can see if the same code is in use by multiple users.

 

I know its probably something simple, but im having an off day

 

Any help would be greatful

Link to comment
Share on other sites

I have done (group by code) but that also shows every user who does have a code to themselves. Creating a long list!

 

What i need (if possible) is to see ONLY those users who have the same code as another user, with the code they were given

 

eg

 

see Mr X with code 12345

and Mr Y with code 12345

but not Ms Z with code 54321

 

hope im explaining this right?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.