waynew Posted August 7, 2008 Share Posted August 7, 2008 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 More sharing options...
Xurion Posted August 7, 2008 Share Posted August 7, 2008 Try using 'DAYOFMONTH' instead of 'DAY' Link to comment https://forums.phpfreaks.com/topic/118651-solved-i-need-an-extra-pair-of-eyes/#findComment-610876 Share on other sites More sharing options...
waynew Posted August 7, 2008 Author Share Posted August 7, 2008 Tried that but it doesn't seem to return anything? Meaning my drop down lists for the days are not working. Thanks though. Link to comment https://forums.phpfreaks.com/topic/118651-solved-i-need-an-extra-pair-of-eyes/#findComment-610888 Share on other sites More sharing options...
DarkWater Posted August 7, 2008 Share Posted August 7, 2008 You should use DAYOFMONTH and alias the columns. Link to comment https://forums.phpfreaks.com/topic/118651-solved-i-need-an-extra-pair-of-eyes/#findComment-610890 Share on other sites More sharing options...
waynew Posted August 7, 2008 Author Share Posted August 7, 2008 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. Link to comment https://forums.phpfreaks.com/topic/118651-solved-i-need-an-extra-pair-of-eyes/#findComment-610903 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.