Jump to content

Need Php code to display the probability for the given number


rishibala143

Recommended Posts

Hi

 

I need to display the probability for the given number. Suppose if the given number is 2. It should display

 

H-H

H-L

L-H

L-L

 

It should generate the probability dynamically for the given number.I dont know how to do this using php.. Please help...Its Urgent...

 

 

Thanks & Regards

P.Balakrishnan

Link to comment
Share on other sites

Hi

 

SELECT team_id, GROUP_CONCAT( play_result, round_no

ORDER BY round_no

SEPARATOR '-' ) AS team_res, SUM( play_total ) AS total

FROM tbl_play

GROUP BY team_id

HAVING team_res = 'W1-W2' || team_res = 'W1-L2' || team_res = 'L1-W2' || team_res = 'L1-L2'

ORDER BY total DESC

 

In this above query the win and loss is hardcoded for two rounds...If there is 3 round

i have to write like this

 

SELECT team_id, GROUP_CONCAT( play_result, round_no

ORDER BY round_no

SEPARATOR '-' ) AS team_res, SUM( play_total ) AS total

FROM tbl_play

GROUP BY team_id

HAVING team_res = 'W1-W2-W3' || team_res = 'W1-W2-L3' || team_res = 'W1-L2-W3'  etc...

 

So only i need to generate the probability of given number(i.e round number.)

 

 

Please help

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.