Joining tables (a little bit tricky) |
(06-24-2015, 09:12 AM)tomop Wrote: Hi guys, I have a small problem here with joining two tables and echoing result to the view. I'll try to explain it as simply as possible. You can join the tables twice in a SQL query SELECT males.first_name, males.last_name, females.first_name, females.last_name, c.* FROM couples c INNER JOIN members males ON males.id = c.m_id INNER JOIN members females ON females.id = c.f_id |
Messages In This Thread |
Joining tables (a little bit tricky) - by tomop - 06-24-2015, 09:12 AM
RE: Joining tables (a little bit tricky) - by element121 - 06-24-2015, 09:53 AM
|