Germaris Posted October 18, 2006 Share Posted October 18, 2006 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 Quote Link to comment Share on other sites More sharing options...
redarrow Posted October 18, 2006 Share Posted October 18, 2006 count($what_ever) Quote Link to comment Share on other sites More sharing options...
Germaris Posted October 18, 2006 Author Share Posted October 18, 2006 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 ! Quote Link to comment Share on other sites More sharing options...
redarrow Posted October 18, 2006 Share Posted October 18, 2006 you need sum and count ok heres a link i use for any mysql problams keep it ok.http://www.1keydata.com/sql/sqlcount.htmlhttp://www.1keydata.com/sql/sqlfunctions.html Quote Link to comment Share on other sites More sharing options...
Germaris Posted October 19, 2006 Author Share Posted October 19, 2006 OK. I'll give it a try... Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.