MySQL Forums
Forum List  »  InnoDB

Re: Sort (ORDER BY) by a comma-separated list of related fields using MySQL 4.1?
Posted by: Phil Powell
Date: March 02, 2006 06:59PM

Ok, first of all, I ran your simple query, and here are the results

mysql> select s.student_first_name
-> , s.student_last_name
-> , group_concat(
-> e.ethnicity_name
-> order by e.ethnicity_name
-> )
-> from student s
-> inner join student_ethnicity_interest_assoc s2e
-> on s.id = s2e.student_id
-> inner join ethnicity e
-> on s2e.ethnicity_id = e.id
-> group by s.student_first_name
-> , s.student_last_name
-> order by s.student_first_name
-> , s.student_last_name
-> , group_concat(
-> e.ethnicity_name
-> order by e.ethnicity_name
-> ) ;
ERROR 1111 (HY000): Invalid use of group function

---------------------------------------------------------------------------

I don't think this is a legal query in MySQL 4.1.12, sorry :(

Phil

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Sort (ORDER BY) by a comma-separated list of related fields using MySQL 4.1?
2103
March 02, 2006 06:59PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.