September 27th, 2000, 02:59 PM
I would like to be taught about how can I manage this:
1.- I have two mysql tables (Products and Categories).
2.- Tipical 'Products' entries are:
ID - P_NAME - P_Category_ID - P_DESCRIPTION
1 - Mouse - 1 - Microsoft mouse..
2 - Canon BJ-200 - 2 - Canon BJ-200 Buble Printer.
3.- Helwet-Packard - 2 - Last HP printer..
4.- Quick-Cam - 3 - Color USB Quick-Cam
3.- Tipical 'Categories' entries are:
ID - C_NAME - DESCRIPTION
1 - Mouses - List of mouses.
2 - Printers - List of printers.
3 - Cams - List of cams
3.- now I would like to search products and display them grouping by categories. I do know how to make a search and how to order results but I don't know how to grouping these records by categories. For instance:
Top > Mouses
1. Mouse: Microsoft mouse
Top > Printers
2. Canon BJ-200: Canon BJ-200 Buble Printer.
3. Helwet-Packard: Last HP printer..
Top > Cams
4. Quick-Cam: Color USB Quick-Cam
Sorry for my poor writing english and thanks in advance.
September 30th, 2000, 02:14 AM
Check out the 3 part tutorial about setting up a e-commerce site on www.devshed.com, it should help you with this problem.
Go to http://www.devshed.com/Server_Side/PHP/ and you will see all three. Excellent tutorial and download the code, it is organized well and easy to follow. Pay close attenction to how the products and categories are set up.