Hi all,
I'm kinda lost in the dark here. I play around with php for the fun of aquiring a new skill. Im still a newbie @ writing php code. I have written a few scripts to generate basic tables with fixed header columns, but they were written very bulky & static. I was advised by a collegue to look into using dynamic generation of tables. He also mentioned redesigning my DB and use inner joins.
I'm trying to achieve having two drop down boxes. First with the Province, then when that is selected it populates the second box named Town. If possible I would like to have an option of "All" in both drop down boxes to facilitate pulling all of the data either of the whole country or only all the towns in a certain province.
I want to compile a table from a DB which contains the different pricing of a product at different stores. The final layout I want to look something like this:
<<Province Name>> //large font in bold
<<Town Name>> // smaller font in bold
<Retailer Name>> ||<<Brand name>> ||<<Price>>
<Retailer Name>> ||<<Brand name>> ||<<Price>>
<Retailer Name>> ||<<Brand name>> ||<<Price>>
<Retailer Name>> ||<<Brand name>> ||<<Price>>
If possible also a layout in which I list all entries in the DB. For example:
<<Province Name>> //large font in bold
<<Town Name>> // smaller font in bold
<Retailer Name>> ||<<Brand name>> ||<<Price>>
<Retailer Name>> ||<<Brand name>> ||<<Price>>
<Retailer Name>> ||<<Brand name>> ||<<Price>>
<<OPEN LINE HERE>>
<<Town Name>> // smaller font in bold
<Retailer Name>> ||<<Brand name>> ||<<Price>>
<Retailer Name>> ||<<Brand name>> ||<<Price>>
<<OPEN LINE HERE>>
<<Town Name>> // smaller font in bold
<Retailer Name>> ||<<Brand name>> ||<<Price>>
<<OPEN LINE HERE>>
<<Province Name>> //large font in bold
<<Town Name>> // smaller font in bold
<Retailer Name>> ||<<Brand name>> ||<<Price>>
You guys get the picture.
My Database layout look like follows:
Table Fields
province id, province
town id, town, province_id
retailer id, retailer, town_id
brand id, brandname, retailer_id
price id, price, brand_id
If you guys can help me in the right direction it would be greatly appreciated. I have no idea where to start and most of the help I find on google is way over my head. I was able to do this in Access quite quickly, but PHP is getting the better of me.
Thank you in advance. As I have mentioned ANY help is apprectiated.