看板 Database 關於我們 聯絡資訊
※ 引述《SmallBeeWayn (喵喵叫的蜜蜂貓)》之銘言: : 系統 PHP 5.1.4 + MySQL 4.1.18 : 原來的作法: : $sqlquery="SELECT Contestants.Anime FROM Rounds,Contestants WHERE : (Rounds.List='".$list."' AND Rounds.Win=1 AND : Rounds.Contestant=Contestants.Contestant) ORDER BY Contestants.Anime"; "SELECT DISTINTCT c.Anime, COUNT(*) FROM Rounds r, Contestants c WHERE (r.List='$list' AND r.Win=1 AND r.Contestant=c.Contestant) ORDER BY c.Anime" 不知道這樣可不可以.. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.119.192.195
foxzgerald:這樣 count 好像只會算到一個 XD 07/13 22:40
ppanerai:這樣不行吧 ... = = 07/14 08:01