Jump to content

[SOLVED] I need an extra pair of eyes:


waynew

Recommended Posts

I can't find the error. Maybe because it's late in the day. I don't know. Could somebody have a look see?

 

$get_details = mysql_query(
  
       "SELECT day(start_date), month(start_date), year(start_date),
                     day(end_date), month(end_date), year(end_date),
        location, description, team_a_id, team_b_id, time,
        status FROM sport_fixture WHERE fixture_id = '$fix'") or die(mysql_error());

 

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(start_date), month(start_date), year(start_date),

 

I'm going to feel really stupid after this.

Link to comment
https://forums.phpfreaks.com/topic/118651-solved-i-need-an-extra-pair-of-eyes/
Share on other sites

Didn't have to use aliases:

 

$get_details = mysql_query(
  
       "SELECT DAYOFMONTH(start_date), month(start_date), year(start_date),
	           DAYOFMONTH(end_date), month(end_date), year(end_date),
			   location, description, team_a_id, team_b_id, time,
			   status FROM sport_fixture WHERE fixture_id = '$fix'") or die(mysql_error());

 

Thanks guys.

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.