Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. It shouldn't work... it shouldn't even be allowed.
  2. I don't understand your first question... and for the second, you had better be storing the SQL standard date format in your DB.
  3. Ultimately, SETs are bitmasks, which is just not worth the hassle. I wouldn't worry too much about have one extra permissions table; I promise it won't be the bottleneck in your app.
  4. fenway

    Select bitmask?

    It will be slow... and you should look here for examples.
  5. SUM doesn't take a second argument.
  6. I don't think you mean EXISTS... that just a boolean.
  7. Sorry, you said DB and it sounds like you mean table.... you can full-text index across up to 16 columns, or use LIKE to match as many as you want... it's just slow.
  8. Not sure what you mean... editing a record? There must be hundreds of example of this "typical" php/mysql interaction.
  9. This won't work -- don't even try and move a column!!!
  10. You can use a bunch of IF() statements to determine what INTERVAL to add.
  11. You almost never want distinct... except inside a COUNT().
  12. Because of the ordering...
  13. You don't get that choice... you can easily clean up this file regularly... or roll your own.
  14. It's not against forum policy, I just don't have the time -- and it's still just a single mysql query, unless I've already forgotten the task at hand.
  15. You can do this in a single query... you just have to know ahead of time how many levels deep to want to go.
  16. It's possible that your project doesn't need it... but just because you don't see a need for something doesn't mean that it shouldn't be impossible to add later on.
  17. True enough... if you're doing many inserts/updates that are for "logging" only, then yes.
  18. Which one?
  19. If you look at one my first posts in this thread, I told you that you're going to have to JOIN in as many tables as you want levels.
  20. Because you don't need to *yet*... what if you want to temporary grant a permission?
  21. That's tricky... the real issue is how to determine what those dates are first.
  22. The outer loop.
  23. What's the new error?
  24. FYI, this will also work, assuming there are no inserts in between: NSERT INTO question_option (question_id, question_option_id, creation_date, last_updated_date, question_option_text, question_option_correct) VALUES ( LAST_INSERT_ID(), 1, NOW(), NOW(), '', 1), ( LAST_INSERT_ID(), 2, NOW(), NOW(), '', 0), ( LAST_INSERT_ID(), 3, NOW(), NOW(), '',0), ( LAST_INSERT_ID(), 4, NOW(), NOW(), '', 0);
  25. Why not? JS has no idea PHP exists, and vice-versa -- different runtime.
×
×
  • 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.