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? Link to comment https://forums.phpfreaks.com/topic/1073-utc_date/ 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 Link to comment https://forums.phpfreaks.com/topic/1073-utc_date/#findComment-3648 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.