Jump to content

benanamen

Members
  • Posts

    2,134
  • Joined

  • Last visited

  • Days Won

    42

Everything posted by benanamen

  1. Still no need for a second table even in that case.
  2. You should have one table, not two. What if the children have children, then they are also parents. This is no different than products and "Sub Categories." id - name - parent_id See the The Adjacency List Model here: http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/
  3. OP, you need to Romeo Tango Foxtrot Mike.
  4. OP, You were already given numerous replies to this on the other forum. Why are you again posting the same exact question here? As you said the other day on the other forum
  5. Admittedly, I am far from clear on what he is doing with the limited information he has provided in this thread. Looking at the image in post #22 it just doesn't look right for a DB design. The comment was in direct response to the 3 tables at the bottom of the image. Admin, Master, and Franchisee which all have a single column with an ID from who knows where or what it is supposed to mean. You're not really saying that is correct are you? Additionally, the OP's sql dump from post #24 has no keys tying any of the data together and then there is the negative values in table Master_Reqruitment. What in heaven's name does that mean? I have no idea what information was given in some unlinked thread. Could you, @Jaques1, build a proper DB application based on this thread?
  6. Whatever your doing, inserting an id into individual tables is just wrong. You don't seem to grasp how to provide the information needed for someone to help you with this, so I am going back to passing on this. Good luck.
  7. Does each level only recruit the level directly below them or all levels below them? Example: Can a boss recruit a franch or only a master and admin? What happens if a recruit does not get all the confirmations? This is what I mean by rules and details.
  8. Not upset at all. Lets try this again. Forget that you have any code or database and you were hiring someone to build the application. Provide a detailed explanation of the project and requirements. All I know so far is it is some sort of "recruiting" app. Recruiting who for what? Who is recruiting who? What rules or restrictions are their on the recruiters and the same for those being recruited and so on. What are ALL the parameters for this app?
  9. What exactly is the overall thing/purpose you are doing with this "program"?. (I dont mean how you think whatever should be done)
  10. I am going to leave this to someone else. Do you really think someone could build a database application from the information you provided in this thread? And I don't think the DB is wrong, It just is. * A flow chart is not business rules. * The picture is NOT a blueprint. It is your incorrect attempt to do whatever it is you're trying to do which you have far from made clear. * "simple recruitee - recruit application." Who the heck knows what that involves. You clearly have not said. * "The rules are simple as I told you that it's hierarchical in nature." - Completely meaningless. No one could build anything from what you have said and provided. I have no desire to continually have to drag information out of you.
  11. I did study the picture for a little bit and it is clear you definitely have design issues even without knowing what it does. From your description it is apparent we need to define exactly what this app is going to do and the rules regarding that before a single table is created. So if you have not done so already, put together a detailed requirement list for this app including a much more detailed description of the app. Think in terms of a blueprint for a house. With a proper blueprint any Builder could build the house without asking questions.
  12. A picture is for hanging on the wall. Please post the actual SQL dump. I have no idea what all the pretty colors mean and cannot see how tables are tied together. I can't import a picture to my database and recreate your schema and I cant run queries against a picture. It will be helpful to have an overview of what this app is.
  13. It's pretty clear that your database design is completely wrong. Unless you fix it correctly, everything you do with the database will be some sort of hack. You were offered to have experts review your database design at no charge yet you don't take advantage of it. I don't understand that. If you go into coding with a "it works so I'll use it" attitude you're not going to get very far.
  14. @ajoo, best thing to do is post an actual SQL dump of your DB schema along with sample data. The database is the foundation of all the code you are going to write so it is very important that the DB is correct FIRST. There are reasons to use UNION as Barand has said, but when it comes to noobs on forums using it, they database is usually designed incorrectly.
  15. In that particular example I would say that should be one table people. A lecturer could also be a pupil and vise versa. You would end up duplicating data with two tables.
  16. Lol! We both have the same exact post time so you missed me by seconds. Still +1 for the right answer.
  17. Depending on a button name to be submitted for your script to work is wrong and will completely fail in certain circumstances, one being in IE. I suspect you are testing it on <= IE8. You need to use if ($_SERVER['REQUEST_METHOD'] == 'POST') Then do additional checks.
  18. When I see someone using UNION that waves a red flag to me about the DB design. @Barand, with the info OP has provided, wouldnt you say there is an underlying DB design problem here?
  19. I had a feeling you were trying to do something with pagination. This is a classic XY Problem. http://xyproblem.info/ I am surprised the other experts didn't see through what you were asking. I am not inclined to get into this, but you are doing it all wrong. You have now provided enough information that the others here will now be able to properly help you with the "real' problem.
  20. Allow me to get beyond your "problem". What exactly is it that you are doing that you need to generate 100 links?
  21. I can't really make it any simpler than it is. Did you even try the examples on the page? SELECT something FROM somewhere WHERE this OR that OR that OR that OR that_too. You spent no more than 5 minutes on it from the time you replied back.
  22. You are looking for the OR operator. https://www.techonthenet.com/mysql/or.php
  23. That is really the start of your answer. You are storing your data incorrectly which will force you to continually create hacks to manage your data. Look up and learn "Database Normalization".
  24. It would appear your database is set up incorrectly. Category should be the category ID tied to a separate category table.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.