Skip to main content
Topic: Cannot join 1 table more than once (Read 803 times) previous topic - next topic

Cannot join 1 table more than once

Hi Guys,

Example: I have MAIN table w/ created_id and updated_id fields that reference to USER table id field. How to do this in phprad gui?
I want this query below to be accomplish in phprad but it seems i can only join table once in GUI.

SELECT c.username AS created_by, u.username AS updated_by
FROM MAIN m
LEFT JOIN user c ON m.created_id = c.id
LEFT JOIN user u ON m.updated_id = u.id

Re: Cannot join 1 table more than once

Reply #1
@jp26198926‍ please use the Join Table Configuration and add as many tables as you want by selecting the table on the left panel and click on the Add Table button and configure them accordingly.


Re: Cannot join 1 table more than once

Reply #3
@jp26198926‍ you cannot do that, you have to use one field to link a table to the current table. In summary, you only join a table to the current table once.

 

Re: Cannot join 1 table more than once

Reply #4
@jp26198926‍ you cannot do that, you have to use one field to link a table to the current table. In summary, you only join a table to the current table once.
Hi @Willvin, ahh okay noted for the limitation, hopefully it can be added this feature on the next version release :D so that we can display the names of who created and who's the updating the data record :)

Thank you,