Guest Tim_Christopher Posted September 27, 2003 Share Posted September 27, 2003 $conn = db_connect(); $query = "SELECT eventDate, eventName FROM tblEvents WHERE eventDate >= \'UTC_DATE()\' ORDER BY eventDate"; $result = mysql_query($query) or die(mysql_error()); How do I edit the above query to show only the events that are either greater than or equal to the current date? eventDate is a date field in the database stored in yyyy-mm-dd format... Just realised that I\'m using MySQL version 4.0.1-standard, and I need 4.1.1 :-( Is there an easy way to mimic UTC_DATE() using functions that are available in earlier versions? Quote Link to comment Share on other sites More sharing options...
Barand Posted September 27, 2003 Share Posted September 27, 2003 [php:1:9ce60bc25f]<?php $query = \"SELECT eventDate, eventName FROM tblEvents WHERE eventDate >= CURDATE() ORDER BY eventDate\" ; ?>[/php:1:9ce60bc25f] hth Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.