Hello guys, how do I create the PHP script with this following instances of table:


Code:
ID  Name    Place   Date and Time

1  Dodong   Cebu   2007-04-03 07:07:05
2  Mike     Cebu   2007-04-03 07:07:05
3  Helen    Cebu   2007-04-03 07:07:05
4  Rusbel    Cebu   2007-04-05 07:07:05
5  Sol      Manila   2007-04-05 07:07:05
6  Rebeka   Cebu    2007-04-05 07:07:05
7  Dods    Manila   2007-04-05 07:07:05
8  Apple    Manila   2007-04-05 07:07:05
9  Dodong  Cebu    2007-04-03 07:07:05
10  Dodong  Cebu    2007-04-03 07:07:05
11  Rusbel   Cebu    2007-04-05 07:07:05


First, based on the above information, I want to create a PHP script that will count a number of names in a particular date and time. Shall we say, there are 3 names in the 2007-04-03. The counter will count the repeating name as one in a particular date.

Second based also on the table above, how do I write a PHP scripts that will get the summation of all names from all the dates there. Shall we say, there are 8 names from 2007-04-03 to 2007-04-05. The counter also will count the repeating name as one in particular date.

Third, based also the table, how do I write a PHP scripts that will get the result to count the number of names in a certain Place. Shall we say, there are four name in the Cebu place.

Thanks in advance.