retrieving data from two mysql tables where the second table depends on the first -
i have 2 mysql tables:
users(id_user, name, age, gender ). ways(#id_user,id_way, start, end, date).
what want retrieve ways corresponding users details. result this:
id_way | start | end | date | id_user | name | age | gender --------------------------------------------------------------------------- 2 | place1 | place2 | 12/06/2013 | 145 | john | 28 | m
have tried join?
select ways.id_way, ways.start, ways.end, ways.date, users.* ways join users using (id_user)
Comments
Post a Comment