2
By merging you will have the list of all the names of the clients table listed in the users table.
SELECT clients.name
FROM users INNER JOIN clients
ON (users.id = clients.user_id)
If you want to bring all the columns, just replace name with *
SELECT clients.*
FROM users INNER JOIN clients
ON (users.id = clients.user_id)
I think what you’re looking for is something like
select * from clients where user_id = id_do_seu_usuario
. Is relatively simple– Artur Trapp
Cool guy, I did the way you said I took the id of the logged User in the session and played in the query, returned the desired result, I thought it would be more complex and necessary to use joins.. VLW!
– wDrik