Jump to content

[SOLVED] mysql_query("SECECT YEAR end FROM roundslog WHERE ended='No' AND end>'$date'&qu


ababmxking

Recommended Posts

$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
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.