RE: [PHP] Odd PHP/MySQL Question

From: Date: Thu, 01 Mar 2001 20:20:01 +0000
Subject: RE: [PHP] Odd PHP/MySQL Question
Groups: php.general 
Request: Send a blank email to php-general+get-42215@lists.php.net to get a copy of this message
You could try something like this: SELECT year, count(studentID) FROM students GROUP BY year ...where studentID is the primary key column/field in your students table. Josh Hoover KnowledgeStorm, Inc. Searching for a new IT solution for your company? Need to improve your product marketing? Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify the process for you. KnowledgeStorm - Your IT Search Starts Here > I have a user database where a year has to be put in. > > Now, I want to compile a list of each different year and how > many users are in that year. > > Is there a way to do this beyond coding for each year: > > SELECT * FROM students WHERE year = '1983' ? > > - Kath >

« previous php.general (#42215) next »