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

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -