Hi All. I would some help on displaying on HTML and creating the SELECT.
I have 2 tables and I would like to store on a variable the result of count how many users are on every Division.
I know I can do it as:
SELECT Count(*) FROM MisEquipos WHERE campoalt = 58;
But How can I do the SELECT on PHP, displaying the results of the count of every division on a simple table??
Would be great if someone could help me out..
Code:
mysql> SELECT * FROM Divisions;
+-----+----------+------------+--------------+----------+
| lid | equipoID | createdate | divisionname | password |
+-----+----------+------------+--------------+----------+
| 22 | 58 | 2004-05-28 | Primera | |
| 23 | 59 | 2004-05-28 | Second | |
+-----+----------+------------+--------------+----------+
1 row in set (0.01 sec)
mysql> SELECT * FROM MisEquipos;
+-----+-------------+----------+------------+------------+----------+
| lid | campeonatos | username | equipo | createdate | campoalt |
+-----+-------------+----------+------------+------------+----------+
| 62 | 1 | jukio | Jukialn | 2004-05-29 | 58 |
| 61 | 1 | picciotd | Piccio | 2004-05-29 | 58 |
| 60 | 1 | gery | GeryRivera | 2004-05-28 | 58 |
| 59 | 1 | admin | Gerardo | 2004-05-28 | 59 |
| 58 | 1 | r0ot | r0oting | 2004-05-28 | 59 |
+-----+-------------+----------+------------+------------+----------+