OK sorry for not being more specific. Here is the result I need and below is my table structure:
Here is a link to the actual page as it works now:
One more thing, I need to output everything alphabetically with a few acceptions. Specials and New Arrivals needs to be the 1st Category and Imperfect needs to be the last. So I added the priority field to the cat table and I am ordering by priority,cat_name
Specials and New Arrivals is priority 0
Imperfect is priority 2
everything else is priority 1
Example:
Specials and New Arrivals :NO LIVE ARRIVAL GUARANTEE!!!(Note: Specials and New Products is the cat_name - :NO LIVE ARRIVAL GUARANTEE!!! is the cat_desc from the cat table)
Frog and Toad: (Note: Frog and Toad is the scat_name from the scat table)
Product 1 - Price1 - Price 2 (Note: Product 1 is the name and Price1 is p1 from the product table)
Product 2 - Price1 - Price 2
Product 3 - Price1 - Price 2
Product 3 - Price1 - Price 2
Lizard: (Note: Lizard is the scat_name from the scat table)
Product 1 - Price1 - Price 2 (Note: Product 1 is the name and Price1 is p1 from the product table)
Product 2 - Price1 - Price 2
Product 3 - Price1 - Price 2
Product 3 - Price1 - Price 2
Arachnid :NO LIVE ARRIVAL GUARANTEE!!! (Note: Arachnid is the cat_name - :NO LIVE ARRIVAL GUARANTEE!!! is the cat_desc from the cat table)
Scorpion: (Note: Scorpion is the scat_name from the scat table)
Product 1 - Price1 - Price 2 (Note: Product 1 is the name and Price1 is p1 from the product table)
Product 2 - Price1 - Price 2
Product 3 - Price1 - Price 2
Product 3 - Price1 - Price 2
Spiders & Tarantulas: (Note: Lizard is the scat_name from the scat table)
Product 1 - Price1 - Price 2 (Note: Product 1 is the name and Price1 is p1 from the product table)
Product 2 - Price1 - Price 2
Product 3 - Price1 - Price 2
Product 3 - Price1 - Price 2
--
-- Table structure for table `cat`
--
CREATE TABLE `cat` (
`cat_ID` int(11) NOT NULL auto_increment,
`cat_name` varchar(60) NOT NULL,
`cat_desc` varchar(200) NOT NULL,
`image` varchar(200) NOT NULL,
`priority` int(11) NOT NULL default '1',
PRIMARY KEY (`cat_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ;
-- --------------------------------------------------------
--
-- Table structure for table `scat`
--
CREATE TABLE `scat` (
`scat_ID` int(11) NOT NULL auto_increment,
`cat_ID` int(11) NOT NULL,
`scat_name` varchar(60) NOT NULL,
`scat_desc` varchar(200) NOT NULL,
`image` varchar(200) NOT NULL,
PRIMARY KEY (`scat_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=33 ;
-- --------------------------------------------------------
--
-- Table structure for table `product`
--
CREATE TABLE `product` (
`ID` int(11) NOT NULL auto_increment,
`cat_ID` int(11) NOT NULL,
`scat_ID` int(11) NOT NULL,
`name` varchar(200) NOT NULL,
`latin` varchar(200) NOT NULL,
`p1` varchar(100) NOT NULL,
`p6` varchar(100) NOT NULL,
`p12` varchar(100) NOT NULL,
`p25` varchar(100) NOT NULL,
`free_form` varchar(255) NOT NULL,
`active` int(11) NOT NULL default '1',
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=532 ;