Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. I'm sorry, you're storing *what* in the session variable?
  2. I'm not sure exactly what you're asking.
  3. I can't stand workbench -- they made it very annoying to edit individual rows -- especially those without PKs.
  4. I wish I had this much free time.
  5. Probably because it's an auto-increment value -- but still a bad, bad idea.
  6. Yes, but you are supposed to know which one you chose -- i.e. separated by tab, quote spaces, etc.
  7. fenway

    Slow Query

    EXPLAIN would have helped a lot here.
  8. And OBVIOUSLY you're not sending your passwords across the network so they will end up logs. And OBVIOUSLY you're not storing your passwords in plaintext. And OBVIOUSLY you're using a case-senstive collation.
  9. It's troubling that you export your data, but you don't understand how, or why, it works.
  10. Well, for starters, there's no way to ensure that each column contains the same type of information. Then there's the issue of unweildly queries, like the one above. And good luck ever re-partitioning.
  11. Yeah, agreed -- some of them are huge.
  12. ORDER BY RAND() performs very poorly on any reasonable amount of data. Which, IMHO, is fine, because very few real-world problems need totally random (or truly random) anyway.
  13. CONVERT_TZ and the current timezone will help.
  14. The usual consideration is whether or not you want it to be timezone aware.
  15. Yeah -- it's always easiest to get in to the DB first, and then manipulate it. FWIW, there is a CSV engine type.
  16. "clickable in SQL" doesn't mean anything. What are you actually trying to do -- and why do you want SQL to do it for you?
  17. You'll need multiple field values for VALUES -- i.e. VALUES (one,two), (three,four).
  18. mysql_result() is less than ideal -- better to use a fetch call and get back a hash -- that will also make it clear what's going wrong. Also, you're completely open to SQL injection.
  19. Personally, I've never been a fan of SQL_CALC_FOUND_ROWS; it's so rare that (a) you need an exact count and (B) users need to be able to get to the last page.
  20. It's important to recognize that checking a column that's been NULL-ed out by a non-matching LEFT JOIN can't ever succeed.
  21. The question is really why you think you need FK constraints.
  22. Actually, there are many reasons to store serialized data -- but very few beginners have *good* reasons to do so. Short answer: if you're even going to need to query, join on, or change, an individual piece of this 'array', then it should not be an array.
×
×
  • 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.