Skip to content
Advertisement

Joined table not returning any results

I successfully joined tables in another part of my code so I followed the same pattern but this time it is not returning any result and I don’t understand why.

Here are the tables I am trying to join :

– roles

JavaScript

– users

JavaScript

And here is the request :

JavaScript

Advertisement

Answer

Since both 2 tables have id column, it is required to specify which table is referring by <table_name>.id

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement