Hello
how can i count two same items and make it in one?
Like i have mysql database
Name , Score
Team1 3
Team2 1
Team1 3
Team3 4
Team2 1
I need it shows in php like
Team1 6
Team2 2
Team3 4
Hello
how can i count two same items and make it in one?
Like i have mysql database
Name , Score
Team1 3
Team2 1
Team1 3
Team3 4
Team2 1
I need it shows in php like
Team1 6
Team2 2
Team3 4
What do you think?
I mean
this is in mysql
there are data and it looks like this
Team1 3
Team2 1
Team1 3
Team3 4
Team2 1
I need code for it that only shows 1 team if there are 2 or more and count score for all that teams so it is not like
Team1 3
Team2 1
Team1 3
Team3 4
Team2 1
but
Team1 6 (Team1,Team1)(3+3)
Team2 2 (Team2,Team2)(1+1)
Team3 4 (Team3)(4)
Something like total scores
I know what you want, that wasn’t my question. My question was, what do you think? Think about what you need to do first. You are probably overthinking the issue and cant see the easiest way to handle the problem.
I don’t know i tried something like
SELECT Name, Score FROM games WHERE Name= next i dont know what to type getting confused i dont know all options what php is giving i tried to search in google but didnt find anything usefull…
Here are two options to look into.