Page is a not externally linkable
- Code, Content, and Presentation
-- Databases
---- A little help with "select group by"


Dijkgraaf - 8:11 pm on Dec 19, 2011 (gmt 0)


The problem was that you had the following only in the select.
IF(SUBSTRING(ip.Item, 4, 4)="Room","Room",ip.Item) AS Item'
If you wanted everything with Room grouped you would also have needed that logic in the group by statement as that occurs before the select does.


Thread source:: http://www.webmasterworld.com/databases_sql_mysql/4399281.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com