LeonLatex Posted June 8 Share Posted June 8 This is being planned, and will have it down on paper for the time being. Actually, the question is not how to set up the database's rows and columns, because I reckon that is the usual way to do it. If it isn't, shout it out. It's when it comes to inserting data, extracting data that it gets a bit confusing. This is a page that is supposed to be about food. E.g. dishes as a category. Or imagine dishes as a topic where there are different dishes such as from different countries. These must then be collected on the food dish from the country that is indicated where the food dish originates, etc., and there may be several subcategories. What is the best way to solve this? This is what I came up with so far. There will probably be more later. Just give me some time so I can get started. Since the last time, my body and I have been on quite a journey. In October 2023 I traveled to Thailand to be there until March 2024. In January 2024 I got food poisoning, and this meant that I was bedridden in the hotel for 2 months. Everything I ate and drank went down into my stomach and returned immediately. Obviously, this resulted in severe dehydration and nutrient absorption. This led to kidney failure and nerve damage throughout the body. I have been and am still seriously ill and am still in a wheelchair in a nursing home. My feet and legs as well as fingers are numb and my fingertips are numb and half numb. That's why I haven't programmed for almost half a year. I also haven't been here on the PHP Freaks forum in as long. As I said, I'm not quite well yet, but I'm getting better and better, and a nerve injury takes a long time to heal. Quote Link to comment https://forums.phpfreaks.com/topic/321495-develop-a-cms-with-categories-and-subcategories-in-the-database/ Share on other sites More sharing options...
requinix Posted June 9 Share Posted June 9 Suggestion: forget categories and use tags. Same basic concept, but while categories are typically hierarchical in nature, tags are more free-form. Then you can tag each dish with whatever countries, cultures, ingredients, allergens, whatever you want. If you haven't seen them before, there's also the "booru" concept of tag namespaces that you can add on top. For example, "Norway" can be a plain tag, or you can namespace it to "country : Norway". "Scandanavian" could be "region: Scandanavia". Apply namespaces where it makes sense, don't where it doesn't. Namespaces would allow you to do things like require that each page be given a country/region tag more easily, too. Quote Link to comment https://forums.phpfreaks.com/topic/321495-develop-a-cms-with-categories-and-subcategories-in-the-database/#findComment-1627335 Share on other sites More sharing options...
LeonLatex Posted June 9 Author Share Posted June 9 11 hours ago, requinix said: Suggestion: forget categories and use tags. Same basic concept, but while categories are typically hierarchical in nature, tags are more free-form. Then you can tag each dish with whatever countries, cultures, ingredients, allergens, whatever you want. If you haven't seen them before, there's also the "booru" concept of tag namespaces that you can add on top. For example, "Norway" can be a plain tag, or you can namespace it to "country : Norway". "Scandanavian" could be "region: Scandanavia". Apply namespaces where it makes sense, don't where it doesn't. Namespaces would allow you to do things like require that each page be given a country/region tag more easily, too. Requinix, i dont know if this a good solution or not. I don't understand what you mean with a tag system. Does it mean to mark some specific image, text, file or directory or something? Is this controlled by a config.php file? Quote Link to comment https://forums.phpfreaks.com/topic/321495-develop-a-cms-with-categories-and-subcategories-in-the-database/#findComment-1627413 Share on other sites More sharing options...
requinix Posted June 9 Share Posted June 9 You've never seen a tagging system before? Think of them as categories, except you can have as many as you want without restrictions. In a way, this thread is in the "PHP Coding Help" category, and that means it can't be part of the "MySQL Help" category at the same time. But if this forum used tags instead, this thread could be tagged as "php" as well as "mysql" and "database design" and "cms". (And actually it can, but people rarely use tags for their threads.) There's no way you haven't seen tags before. Maybe you just didn't realize what they were... Pick more or less any modern blog, look through its posts, and you'll probably see it using tags instead of (or maybe in addition to) categories. Quote Link to comment https://forums.phpfreaks.com/topic/321495-develop-a-cms-with-categories-and-subcategories-in-the-database/#findComment-1627435 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.