Good morning everyone.
PHP Runner V9.8 latest build with mysql database.
I am displaying a totals page which shows the following information which is correct
Selections 39
Won 11
Placed 13
Lost 15
BFP 29
mysql query for the above is:
SELECT
COUNT(*) AS Total Selections
,
COUNT(IF(Result='W', 1, NULL)) AS Won,
COUNT(IF(Result='P', 1, NULL)) AS Placed,
COUNT(IF(Result='L', 1, NULL)) AS Lost,
COUNT(IF(Place='Y', 1, NULL)) AS BFPlace
FROM Races
WHERE (Result
<> "") AND (RaceSystemID = 32)
I would be grateful if anyone can advise me how to calculate a percentage for each count.
What I would like to achieve is
Selections 39
Won 11 28 percent
Placed 13 33 percent
Lost 15 38 percent
BFP 29 74 percent
Thank you.