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
https://forums.phpfreaks.com/topic/59619-spot-the-difference/
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
https://forums.phpfreaks.com/topic/59619-spot-the-difference/#findComment-296246
Share on other sites

Archived

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

×
×
  • 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.