Friday, 15 July 2011

mysql - SQL SELECT QUERY -



mysql - SQL SELECT QUERY -

i have 3 tables:

users: uid int(11) - userid(primary key, auto_increment) name varchar(255) pass varchar(64) created int(11) projects: pid int(11) ..... name varchar(150) description varchar(255) created int(11) users_projects: uid int(11) - user id pid int(11) - product id

what query for: showing projects(name , description) sorted name user name?

this i've got far:

seect name,description projects order name asc

select a.*, b.* users inner bring together users_projects b on a.uid = b.uid inner bring together projects c on b.pid = c.pid order a.name asc

to farther gain more knowledge joins, kindly visit link below:

visual representation of sql joins

mysql sql select sqlyog

No comments:

Post a Comment