This type of presentation must be produced by code - either your application (i.e. in your PHP code) or by a report generator.
SQL statements always return data in a tabular format, i.e. (Topic, Question) 1,1 1,2 1,3 1,4 2,1 2,2 ...etc. In your presentation loop (PHP), remember the "previous" value of Topic from the previous record, and only output the Topic part when it changes. HTH, Tore. ----- Original Message ----- From: "Mike Walth" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 21, 2003 5:34 AM Subject: PHP / MYSQL Question > Not sure if this can be done with just a MYSQL Query or if it needs to be > done in conjunction with a PHP script. What I am trying to do is build a > dynamic FAQ section with PHP. Here are the two tables > > Topics > =========== > TopicID > TopicTitle > TopicDESC > > FAQS > =========== > FAQID > Question > Answer > Topic > > I'm trying to get it to display like this > > Topic1 > Question1 > Question2 > Question3 > Question4 > > Topic2 > Question1 > Question2 > > So each topic would be listed with its set of questions below it. > > Any help would be appreciated. > > Mike Walth > CinoFusion > > > > --------------------------------------------------------------------- > 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 > --------------------------------------------------------------------- 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