Re: Selecting Date Range

From: Date: Thu, 04 Nov 2004 03:10:44 +0000
Subject: Re: Selecting Date Range
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-201075@lists.php.net to get a copy of this message
On Wednesday 03 November 2004 18:47, ConbuD 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. If you're not storing your dates as a real date/time column but as simple varchar column then you've created unnecessary work for yourself. I strongly suggest that you use proper date column types and then you can take advantage of the date handling functions available in MySQL. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* A beer delayed is a beer denied. */

« previous php.general (#201075) next »