ababmxking Posted July 3, 2008 Share Posted July 3, 2008 $year = mysql_fetch_object(mysql_query("SELECT YEAR end FROM roundslog WHERE ended='No' AND end>'$date2'")); $month = mysql_fetch_object(mysql_query("SELECT MONTH end FROM roundslog WHERE ended='No' AND end>'$date2'")); $day = mysql_fetch_object(mysql_query("SELECT DAY FROM end roundslog WHERE ended='No' AND end>'$date2'")); $hour = mysql_fetch_object(mysql_query("SELECT HOUR end FROM roundslog WHERE ended='No' AND end>'$date2'")); $minute = mysql_fetch_object(mysql_query("SELECT MINUTE end FROM roundslog WHERE ended='No' AND end>'$date2'")); $seconds = mysql_fetch_object(mysql_query("SELECT SECOND end FROM roundslog WHERE ended='No' AND end>'$date2'")); end is the datetime field in the table of the database, roundslog is the table ended is another table end is a datetime and $date2 = date('Y-m-d H:i:s'); Ok im getting these errors with these querys. Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result would these be correct or what? i helped a guy with something like this last night and it had something like this in it. Link to comment https://forums.phpfreaks.com/topic/113023-solved-mysql_queryquotsecect-year-end-from-roundslog-where-endedno-and-endgtdatequ/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.