Jump to content

Two query two different sets of data from same table


Bakes

Recommended Posts

The structure of my table is:

(id) (unix_datestamp) (old_owner) (new_owner)

so, old_owner = id of one of my users

and new_owner = id of one of my users

 

I would like to get a list of the rows where the old_owner is in the group 'users' and the new_owner is also in the group 'users'

 

unfortunately, I don't know how I could join them so that:

 

users.group = grouplist.id

 

users.id = history.old_owner

 

users.id = history.new_owner

 

how would I do this?

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.