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
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 !
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.