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 Leif Gregory on 04/20/05 15:53

Hello Chris,

Tuesday, April 19, 2005, 1:23:53 PM, you wrote:
C> Firstly, what DB are you using?

MySQL.

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

C> (or location.name or course.name).

C> It should be as simple as that...

So joining on four tables isn't considered bad practice? Technically
it's going to be five tables because the whole HTML table layout
changes to include "enroll" and "disenroll" buttons once they log in
and based on if they are enrolled or not in a particular course which
comes from the registrations table, which is simply their the "id"
from the Students table and the "id" from the Course table.

Thanks.


--
Leif (TB lists moderator and fellow end user).

Using The Bat! 3.0.9.17 Return under Windows XP 5.1
Build 2600 Service Pack 2 on a Pentium 4 2GHz with 512MB

 

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

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