You are here: Re: [PHP] Sorting table columns dynamically on normalized MySQL tables « PHP « IT news, forums, messages
Re: [PHP] Sorting table columns dynamically on normalized MySQL tables

Posted by Chris Boget on 04/19/05 22:23

> I can do that, but is there a better way? How do you all handle
> dynamic sorting of normalized DBs?

Firstly, what DB are you using?
Secondly, just select and sort on the columns. An example query
would be:

SELECT
course.name,
location.name,
instructor.name
FROM
course
INNER JOIN location ON location.id = course.locationID
INNER JOIN instructor ON instructor.id = course.instroctorID
ORDER BY instructor.name

(or location.name or course.name).

It should be as simple as that...

thnx,
Chris

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация