I have a table, with rows of events, and each one has (amongst lots of other fields) addedbyuser
, editedbyuser
, deletedbyuser
There are INT
, and refer back to the users
table to a particular user.
I am able to join one of the fields (say addedbyuser
) without any problems, how do i join the rest and reference them in php?
events table:
eventid addedbyuser editedbyuser deletedbyuser
1 1 2 3
users table:
id username
1 name1
2 name2
3 name3
So basically, I want to display the names of who added, edited and deleted the article, can I do this in one SQL query?