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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.