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 01:14PM

student
id = '203', first_name = 'Phil', last_name = 'Powell'

ethnicity

id = '1', ethnicity_name = 'hispanics'
id = '2', ethnicity_name = 'african-americans'
id = '3', ethnicity_name = 'asian-americans'

student_ethnicity_interest_assoc

student_id = '203', ethnicity_id = '2'
student_id = '203', ethnicity_id = '3'

should produce something like this:

Phil Powell african-americnns,asian-americans

You should be able to sort by 'Phil', 'Powell' or 'african-americans,asian-americans'

Hope that helps that's about all I'm probably allowed to reveal

Phil

Options: ReplyQuote


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


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.