I'm afraid of the problem, I hope some of you can help me.
I got the following table structure for a table that contains many actions. Then I would like to create a php script that generates some statistics.
+---------------+-------------+------+-----+-------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+-------------+------+-----+-------------------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| MemberID | int(11) | NO | | NULL | |
| MemberNumber | int(11) | NO | | NULL | |
| Status | varchar(20) | NO | | | |
| ClubID | int(11) | NO | | NULL | |
| Clubtype | varchar(5) | NO | | NULL | |
| Time | timestamp | NO | | CURRENT_TIMESTAMP | |
| Gender | varchar(10) | NO | | | |
+---------------+-------------+------+-----+-------------------+----------------+
I am wondering if it is better to allow php or mysql to manipulate data. I would like to get some statistics on the basis of Timeeg year,month,weeksome statistical data on the basis of Clubtypeeg FK,UKand, finally, some statistics on the basis of Gendereg Male,Woman. So it is better to work with count()in mysql queries or it is better to get all the data and let php generate statistics.
Hope this makes sense. thanks for the help:)
EDIT: . year, month,
count(Status)
count(Status) Clubtype = $value
count(Status) Gender = $value
, , week, , , , day. count, .
, , .