Re: Selecting Date Range

From: Date: Wed, 03 Nov 2004 19:00:12 +0000
Subject: Re: Selecting Date Range
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-201072@lists.php.net to get a copy of this message
On Wed, 3 Nov 2004 13:47:38 -0500, ConbuD <conbudd@yahoo.com> wrote: > Hey, I have a database with approx 200-300 students in it. I wanna be able > to pull out what student joined a class with in a certain date range. Say I > wanna get all the students who joined between 10/12/04 through 12/12/04. > What is the easiest way to do this ? Can it be done with just a simple MySQL > query ? I actually enter the date as shown above, I dont use the MySQL > dates. Any help will be greatly appreciated. Where's the PHP code you're using now? What does the query look like in there? You probably want something like this: SELECT * FROM students WHERE join_date >= '10/12/04' AND join_date <= '12/12/04'; But I'm doubting your dates are stored in that format, and I bet there's more than one table to consider as well. Again, where's the PHP code you're asking a question about? -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/

« previous php.general (#201072) next »