PHP and MySQL task
Posted: Mon Sep 20, 2004 3:02 am
Hello everybody, I am pretty new to PHP and need some help. My problem follows...
I have a MySQL table "Items" which is structured as follows...
ItemID-----ItemName------Description------Price------Category
1----------chk.pizza--------blabla------------10---------Pizza
2----------mut.pizza--------blabla------------15---------Pizza
3----------beef pizza-------blabla------------12---------Pizza
4----------chk.burger------blabla------------10---------Burger
5----------mut.burger------blabla------------10---------Burger
6----------beef.burger-----blabla--------------8---------Burger
now i want to display the items as follows...
---------------------HTML PAGE---------------------------------------
Pizzas:
chk.pizza $10
mut.pizza $15
beef pizza $12
Burgers:
chk.burger $10
mut.burger $10
beef burger $8
-------------------------------------------------------------------------
The thing is the categories aren't pre determined and i have to make the blocks according to the categories available in the database and display the related items under each category. I have been trying to work this out since last 4 days but to no avail
I really need help and would really appreaciate any!
Hope i get replies...
Cheers.
Mairaj.
I have a MySQL table "Items" which is structured as follows...
ItemID-----ItemName------Description------Price------Category
1----------chk.pizza--------blabla------------10---------Pizza
2----------mut.pizza--------blabla------------15---------Pizza
3----------beef pizza-------blabla------------12---------Pizza
4----------chk.burger------blabla------------10---------Burger
5----------mut.burger------blabla------------10---------Burger
6----------beef.burger-----blabla--------------8---------Burger
now i want to display the items as follows...
---------------------HTML PAGE---------------------------------------
Pizzas:
chk.pizza $10
mut.pizza $15
beef pizza $12
Burgers:
chk.burger $10
mut.burger $10
beef burger $8
-------------------------------------------------------------------------
The thing is the categories aren't pre determined and i have to make the blocks according to the categories available in the database and display the related items under each category. I have been trying to work this out since last 4 days but to no avail
Hope i get replies...
Cheers.
Mairaj.