I have a table with roll num,name,games. Roll num is primary key,
I am able to store the data in mysql table and able to retrieve it back using PHP.

I enter the details through the form using php script.

01
A
Tabletennis

02
A
Cricket

03
B
Tabletennis

04
B
Cricket

05
C
Tabletennis

06
C
Cricket


I am able to get this using php script
ROLLNUM NAME GAMES
01 A Tabletennis
02 A Cricket
03 B Tabletennis
04 B Cricket
05 C Tabletennis
06 C Cricket.

But I need like

Name TableTennis Cricket
A 1 1
B 1 1
C 1 1
Total 3 3
How TO approach this issue? If any one has the query to process this please let me know…
Thanks in Advance, its Urgent.

sorry i didnt mention it,
i have to use php scripting

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.