On Thu, Jan 10, 2002 at 10:24:37AM +1100, Sam Russo wrote: > I have a delimited file sent to me with students ID subjects and when they > do these subjects. This file (table) looks like: > ID TimeSlot Subject > ++++++++++++++++++++++++++++++++++++ > 215 3 Eng1 > 648 2 Maths2 > 901 4 French > 215 2 Maths1 > 901 1 Science2 > 648 4 Art > 215 1 Science1 > 901 3 Eng1 > > I need to produce the following output (on a web page using php and > mysql) with a mysql query. > > ID 1 2 3 4 > 215 Science1 Maths1 Eng1 > 648 Maths2 Art > 901 Science2 Eng1 > French
You need to cross tabulate the data. http://www.mysql.com/articles/wizard/index.html Bob Hall --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php