Re: help on select

From: Date: Tue, 27 Feb 2001 13:03:43 +0000
Subject: Re: help on select
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-41825@lists.php.net to get a copy of this message
On Tue, Feb 27, 2001 at 03:12:17PM +0700, Yamin Prabudy wrote: > Hi there I had a problem here > I got a database in mysql that contains the date format like this "Mar 12 > 2001" > now i try to sort the database and find out how many data in my MySQL that > had a date > "Mar 12 2001" > > how can i change that kind of format so i can compare the data in unix time > stamp format Try this: <?php $date = mktime(0, 0, 0, 3, 12, 2001); $sql = "select * from table_name where unix_timestamp(date_column) " . "> $date"; ?> -- Jason Stechschulte jpstech@unoh.edu -- Interestingly enough, since subroutine declarations can come anywhere, you wouldn't have to put BEGIN {} at the beginning, nor END {} at the end. Interesting, no? I wonder if Henry would like it. :-) --lwall

« previous php.general (#41825) next »