原帖由 pwct 於 2008-11-24 06:51 發表 
咁參加者報名邊一比賽d data都係放係match (id, name)
定
另外開多個table?
i.e. app(id, match_id , name)? 開多個table, 除非每個比賽都只有一個人參加啦
咁參賽者個名同參賽者個id係score?
member (id, name)
i.e. score (id, match_id, member_id, member_name ,score) ?
score 就唔應該有member_name, 因為你已經擺左係member table, 另外score 唔需要match_id, 只需要match_item_id
match_item (id, match_id, name)
score (id, match_id, score)
點連接?
假設你個score table 係 (id, match_item_id, score)
select * from match_item as mi, score as s where s.match_item_id = mi.id
我試過 我可以用while loop 加 不同評分項目
咁score點樣input?
每個score 都insert 一個record.
我用while loop 佢只係入得1個分
其他評分項目 入5到分
123456 |