views:

50

answers:

3

Hello friends, I have two tables:

services

  • id
  • client
  • service

and

clients

  • id
  • name
  • email

How to list table service and bring together the customer name that the customers table? field customer services in the table has the id of the customer at the customer table,

I appreciate the help from you now

+4  A: 
SELECT * FROM table1 LEFT JOIN table2 on table1.id = table2.id
GWW
+2  A: 
SELECT ...
FROM services AS s
JOIN clients AS c
  ON s.client = c.id
WHERE ...
Daniel Vandersluis
+1  A: 
SELECT ...
FROM services AS s
INNER JOIN clients AS c
  ON s.client=c.id
Ignacio Vazquez-Abrams