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?

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.