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
[EMAIL PROTECTED]
--
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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]