Jump to content
Sign in to follow this  
cyberfly

Mencari History Peserta

Recommended Posts

Table markah

markah4nc1.jpg

Seperti gmbar diatas,aku perlu mencari History Peserta tersebut dalam table markah.(berapa kali dia telah menyertai pertandingan).

Masalah sekarang :

1.dalam table markah tu,mungkin ada idPeserta yg sama,tetapi mungkin idFormat atau idPertandingan yg berlainan.

2.so kalau blh,nak count dari berdasarkan idPertandingan tu,tapi camne kalau dlm tble markah tu ada ada jgk data yg mempunyai idPeserta dan idPertandingan yg sama?

Sape2 blh tlg englighten aku :)

Share this post


Link to post
Share on other sites

erk aku tak nampak sebarang masalah kat sini kalo idPeserta, idFormat, idPertandingan dah ader... or aku yg tak faham hehe

Share this post


Link to post
Share on other sites

erk aku tak nampak sebarang masalah kat sini kalo idPeserta, idFormat, idPertandingan dah ader... or aku yg tak faham hehe

erk..aku pn dah tukar lojik.

sebenarnya kalau blh kalau pertandingan sama,aku taknak view.just nak count jer.

last2 aku tukar lojik aku kepada list semua acara dan pertandingan yg dia masuk.count tu pandai2 org yg tgk la camne. :lol:

Share this post


Link to post
Share on other sites

kalo nak cari yg sama bleh guna DISTINCT

SQL DISTINCT

The SQL DISTINCT command used along with the SELECT keyword retrieves only unique

data entries depending on the column list you have specified after it. ...

www.sql-tutorial.com/sql-distinct-sql-tutorial/

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...