This topic is locked

Setting up categories

5/30/2008 9:04:04 AM
PHPRunner General questions
S
SJWilson author

I'm setting up a site for my client who is a writer. She wants to get all her articles into a database.
I've managed to get PHPRunner to connect to my server's MySQL and I have set up a table for her articles with the following fields:
Title

Category

Date

Content

ID
My client has 109 different categories that her articles can go under. Most articles go under 3-4 categories. On the page where she adds a new article she needs to be able to check off which categories her article fits under. How do I set up these categories? Should they be another table?

J
Jane 5/30/2008

Hi,
I recommend you to create another table with categories.

Then set up Category field in the main table as dropdown (Lookup wizard) on the "Edit as" settings dialog on the Visual Editor tab.

Here is a helpful "How to setup dependent dropdown boxes on Edit/Add pages" PHPRunner tutorial:

http://www.xlinesoft.com/phprunner/php-database.htm

S
SJWilson author 5/30/2008

Thanks Jane, this makes sense but I'm still missing something. I've set up a second table with each category name as a field. When I use the Lookup wizard thingie I can select the new categories table but when I look under the Link Field or Display Field dropdowns I just see my whole 109 categories. What am I doing wrong?

S
SJWilson author 5/30/2008

Ok, I guess I should have set up another table for the categories, and I can see how to link that table to my first one but how do I get the values in to the categories table? Where do I enter the list of 109 categories for her category field?

S
SJWilson author 5/30/2008

I figured it out <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=29855&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' /> PHPRunner is very intuitive. I'm an experienced web developer in everything except databases, this is my first attempt and I was able to set up what I wanted to achieve very quickly. I still have lots of configuring to do but it's up and running with very minimal frustration. So far I'm very impressed.