group by problem
Posted: Thu Feb 08, 2007 5:03 am
feyd | Please use
has following error:
#1064 - 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 'GROUP BY mydate
LIMIT 0, 30' at line 1
feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
group by error, any help
[syntax="sql"]SELECT AllProductions.EventID, AllProductions.OpponentEventID, date_format( AllProductions.EventDate, '%c' ) AS mydate
FROM AllProductions
WHERE AllProductions.`EventID` = 161
OR AllProductions.`OpponentEventID` =161
ORDER BY AllProductions.EventDate
GROUP BY mydate
LIMIT 0 , 30 #1064 - 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 'GROUP BY mydate
LIMIT 0, 30' at line 1
feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]