转自: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了两个表,依次类推即可。 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2021-10-07
猜你喜欢
  • 2022-12-23
  • 2022-02-28
  • 2021-08-09
  • 2021-12-08
  • 2022-12-23
  • 2021-08-11
相关资源
相似解决方案