Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Yup, it's a JOIn.
  2. Assuming your DB design is reasonable, 28 is nowhere near a problem.
  3. Always use an auto-increment, especially if not innodb.
  4. That sounds like an entire script that you're asking for.
  5. I don't think you understood the OP's question.
  6. There are hundreds of posts on this forum explaining how to sort this out -- why not search for some of them? And a sticky, too.
  7. I have no idea what you're talking about.
  8. I thought it was obvious.... you need to join on both the employee and the most recent date to make sure you're just getting a single record per employee.
  9. This is a common question. First, write a query to get the most recent for each employee -- then, join this derived table back to the original table, and voila.
  10. Yes, but you should probably use the administrative commands to do this, since playing with the mysql internal database it just a bad idea.
  11. fenway

    3 way join

    No, you need to alias your columns.
  12. The schema is the actual database -- the ERD is just a diagram indicating abstract concepts.
  13. Next time, read the rules about posting questions on this forum.
  14. You mean UPDATE a record...
  15. What error?
  16. fenway

    3 way join

    What working queries to do you have so far/
  17. Something's unstable.
  18. True, as long as you're careful... unexpected variable interpolation has caused many a bug.
  19. Sound like you need LAST_INSERT_ID() -- there's a php function for this in mysqli, I believe.
  20. Has nothing to do with ON DELETE / ON UPDATE, especially for an INSERT. It just means that you don't have a matching id in the other references table. And when I ask for a query, I don't mean php code.
  21. You didn't do as I said. you're still using multi-query. So don't.
  22. No, not a multi-query -- once per page.
  23. That's a bad idea -- but feel free to ignore me, it's your product, not mine.
×
×
  • 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.