Experienced newbie humbly requests asssistance...
Posted: Mon May 05, 2008 11:57 am
Hello there...
I am creating a database with the following three tables:
One: Categories (Id, CatName)
Two: Subcategories (ID, ParentID, SubCatName)
Three: Articles (CatName, SubCatName, ArtName, ArticleURL)
As I ask these questions, note that I am not new to technology (I’ve worked with Access/ASP) but I am a brand newbie to MySql/PHP. (I know how to create the dbase connections, the dbase, statically add data to the database, and create a form.)
What is the best way to create the ParentID for the subcategories field. Is it just a plain numeric field or do I need to reference the Categories database somehow (same question applies for CatName and SubCatName in the Articles database)?
Tables 1 and 2 will be relatively static. Table 3 will be updated by an online form. How do I create this form so that I will have dropdown lists for the category and subcategory choice and then submit this information back to the table articles in the database?
I have done about 3 hours of online research but everyone seems to have a slightly different method. Thanks in advance for your help,
Richard
Note: I would prefer not to use the javascript option for the dropdowns in case people don’t have javascript enabled. Thanks again, Richard
One last note: It is possible that a category might not have any subcategories….
Thanks,
Richard
I am creating a database with the following three tables:
One: Categories (Id, CatName)
Two: Subcategories (ID, ParentID, SubCatName)
Three: Articles (CatName, SubCatName, ArtName, ArticleURL)
As I ask these questions, note that I am not new to technology (I’ve worked with Access/ASP) but I am a brand newbie to MySql/PHP. (I know how to create the dbase connections, the dbase, statically add data to the database, and create a form.)
What is the best way to create the ParentID for the subcategories field. Is it just a plain numeric field or do I need to reference the Categories database somehow (same question applies for CatName and SubCatName in the Articles database)?
Tables 1 and 2 will be relatively static. Table 3 will be updated by an online form. How do I create this form so that I will have dropdown lists for the category and subcategory choice and then submit this information back to the table articles in the database?
I have done about 3 hours of online research but everyone seems to have a slightly different method. Thanks in advance for your help,
Richard
Note: I would prefer not to use the javascript option for the dropdowns in case people don’t have javascript enabled. Thanks again, Richard
One last note: It is possible that a category might not have any subcategories….
Thanks,
Richard