I have in mysql this data:
id | auto | cost
1 | Ford | 70000
2 | Ford | 12000
3 | VW | 1000
4 | VW | 140000
with while i get all data. but I want what he print how much cost all ford, VW
my formula ($cost 12 / $points) // $points I am getting from over table.
I want what it group auto.
if i wrote:
$auto = ($cost 12 / $points) + $auto; // it's print all cars informations.
I want That count all FORD information and print informations, then count disabled and he are 0. then counting VW. I now i can make it with mysql sentence, but I don't wan't. My formula are more biggest. (😉)
I want what he print only.
ford 82000 //
VW 141000 //
Thanks for help.