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

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -