[thelist] Displaying Records By Date Later Than Current Date (MySQL + PHP)
kris burford
kris at midtempo.net
Tue Jan 20 07:18:20 CST 2004
>This table stores all the meetings that my client is holding or has held.
>For a "forthcoming meetings" page, I need to display any meetings that
>have a date later or equal to today's date.
>
>I've googled this to death, but I must be losing my search technique cos
>I've yet to solve my problem - can anyone help?
>
>Unix server, PHP page outputting XHTML 1.0, MySQL 4.0.16-Max.
depending on how you're storing dates (unix timestamp? mysql date format?
other?) set $date to the same format then just query the database for
records to fit
eg if unix timestamp
$date = mktime();
$sql = "select meetings from table where date >= '$date' order by date";
$results = mysql_query($sql, your_connection_stuff_here);
hth
kris
More information about the thelist
mailing list