Jump to content

PHP-MySQL: Query for stats


Germaris

Recommended Posts

Hi there!

I manage a directory of ancient students of about forty french military schools.
The website is made in Flash but it doesn't matter because I am quite good in Flash-MySQL communication via PHP Scripts.

I'm planning to build a page where users can get, in one click the full school list with, FOR EACH of them, the total of students listed in the directory.

I have no idea of the query I must write to obtain this...
Is there anyone who can help me ?
Many thanks in advance.

Regards
Link to comment
https://forums.phpfreaks.com/topic/24384-php-mysql-query-for-stats/
Share on other sites

Yes, I know that. But the problem is how to write ONE query for ALL the schools, i.e. how to get forty different numbers (one total for each school) with only one query ?

Will it be something like :

$query =mysql_query ("SELECT * FROM $table WHERE school1 = '$a' AND school2 = '$b' AND school3 = '$c' COUNT" ) or die ( "select error " .mysql_error () );

???

Thanks for your time !

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.