转自:http://www.yanshuiting.com/space/html/13/113-121.html
SELECT i.uid, u.icon, u.username, u.blogtitle, u.site, ui.signature, ui.introduce
FROM pw_items i
LEFT JOIN pw_user u
USING ( uid )
LEFT JOIN pw_userinfo ui
USING ( uid )
WHERE i.ifcheck =1
AND i.ifhide =0
AND u.icon <> \'\'
ORDER BY i.postdate DESC
LIMIT 0 , 4
上面的sql语句中left join了两个表,依次类推即可。