View Single Post
  #1 (permalink)  
Old Aug 14th, 2006, 13:32
AceTutor AceTutor is offline
New Member
Join Date: Apr 2006
Location: Australia
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Basic Sorts - How do you group items using id tag? Newbie Kickstart

Greetings - I am a absolute newbie to PHP/MySQL and would appreciate kickstart help

I have attempted tutorial at DMX Zone but failed without success.

See http://www.dmxzone.com/showDetail.as...=2&NewsId=4937

Basic Setup:

Database: MySQL
id Name
0 Fruit
1 Banana
1 Pineapple
1 Kiwi Fruit
1 Apples
0 Vegetable
6 Tomatoes
6 Peas
6 Carrots


Output required:
Fruit
Apples
Banana
Kiwi Fruit
Pineapple
Vegetable
Carrots
Peas
Tomatoes

Requirement:
Depending on designated id, all items starting with 0 become bold category headings listed in alphbetical order and all associated products matching that category would be listed - also in alphabetical order.

A working code sample - or suggested tutorial sites would be greatfully received

Thanks in anticipation

Bless ya heaps

AceTutor

PS. I'm using Dreamweaver 8 / PHP / MySQL (latest versions)

Last edited by Rob; Aug 14th, 2006 at 15:32. Reason: Fixed Link
Reply With Quote