August 28th, 2000, 05:59 PM
can someone please tell me how to make dates appear in a different format than numbers. Here is the code i am using to convert numbers and dates.
$date = mktime($month,$day,$year); this works when inserting into a database
but when i try calling from a database, this only displays todays date:
$tourdate=date("l, F jS",mysql_result($result,$i,"date"));
help is greatly appreciated.. also how could I make it so dates that have passed are not not called from the database? Thanks
August 28th, 2000, 06:51 PM
Is it a DATE field or VARHCAR/CHAR/INTEGER?
I think you should one of these and not a date that could not be what you want!
About the SQL statement:
SELECT * FROM my_table WHERE date > $date
$now = now(); // is it now()? Check this please!
SELECT * FROM my_table WHERE date > $now
This will only list the events after a date x or after today/now. Let's see if works!
Eduardo Teixeira Cardoso
PHP Programmer from Brazil