janim Posted October 21, 2007 Share Posted October 21, 2007 hi all i'm trying to make new program it's like categories i don't know how to make it i want to insert into database new subject but every subject in deferent category i don't know what is the right way to make it please any suggestion Quote Link to comment https://forums.phpfreaks.com/topic/74234-flags/ Share on other sites More sharing options...
wildteen88 Posted October 21, 2007 Share Posted October 21, 2007 This will require two tables, one called categories the other subjects Table setup: categories ---------- subjects id -----+ -------- name | id description +----- cat_id title body When you create a subject you'll want to store the id for the category the subject belongs to. Quote Link to comment https://forums.phpfreaks.com/topic/74234-flags/#findComment-375049 Share on other sites More sharing options...
janim Posted October 21, 2007 Author Share Posted October 21, 2007 thank you for your replay but can you give any link to learn more about it and i will be very very thanks Quote Link to comment https://forums.phpfreaks.com/topic/74234-flags/#findComment-375059 Share on other sites More sharing options...
wildteen88 Posted October 22, 2007 Share Posted October 22, 2007 You'll want to read up on database normalisation. There are many tutorials/articles out there. Here is one I found. You'll then want to learn SQL Joins so your can query 2 or more tables at the same time in the query. Quote Link to comment https://forums.phpfreaks.com/topic/74234-flags/#findComment-375581 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.