Jump to content
pekanzz

Cam Ner Nak Cari Jumlah (sql)

Recommended Posts

salamz,

aku ade satu table lebey kurang cam nih laa:

sumDate sumCall sumPort sumFail sumCon

-------------------------------------------------------

30/8/04 1 3 0 1

30/8/04 1 2 1 0

30/8/04 1 2 0 1

Soalan: Cam ner aku nak kira total sumCall sum Fail sumCon?

Cam ner aku nak sumarizekan jadi kpd 1 Date which is 30.8.04 dgn total

data?

Reason: Aku nak summarizekan sume utk create graph.. the thing is aku sangkut

kat query nih which is aku nak generate php. Kira first of all aku nak

kena show the summary first sebelum aku proceed to graph.

thank you!

Share this post


Link to post
Share on other sites

mmm kalo tak silap aku camni.. guna function sum

SELECT sum(sumCall), sum(sumPort), sum(sumFail), sum(sumCon)  FROM nama_tbl_ko WHERE sumDate = '30/8/04'

kalo ko nak date ko tu dinamik, letak la sbg variable.. ok cantek...?

wallahua'lam...

*ntah betul ntah tak....

Share this post


Link to post
Share on other sites

tak ada respon dah dari si penanya? lengkali kalau dah tanya, orang dah jawab, bebawak la tutup soalan tu. jangan dok diam diam je.

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...

×
×
  • Create New...