DMXzone Database Connector PHP Support Product Page
Multiple joins from the same table
Asked 26 Sep 2018 09:42:32
1
has this question
26 Sep 2018 09:42:32 Duncan Brooking posted:
Is this possible?I have a table that logs an entry. The table has 2 columns that I need joined to a table of users, the first column for who logged the entry and the second for who the entry should be assigned to. These could be the same or different users. I tried adding an alias to the columns to differentiate between them when I need to bind them but it didn't work. I'm so close, I'm just not sure how to get this to work.
Table 1 ID|added_by|assigned_to|action 1|1|2|Shut down Table 2 user_id|user_name 1|Juan 2|Xavier So query result should be - 1 Juan Xavier Shut down
Thanks,