Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Unless you wanted only those results with ALL keywords, in which case you need to having a HAVING clause, or a CROSS JOIN.
  2. How are these tables related?
  3. It's just being stored as an INT (hopefully UNSIGNED).
  4. Yes, but not per row.
  5. You have one keyword/url tuple for each keyword, and each page/
  6. You'd have to case each field separately.
  7. Unmatched backticks, to start.
  8. fenway

    Select query

    Agreed -- the most explicit -- the BETWEEN is an accident.
  9. Federated is super-buggy -- but I guess for read-only it might be ok.
  10. Or with a CASE statement.
  11. You can GROUP_CONCAT() the category names, I suppose.
  12. Why not create a single mysql account that has access to both?
  13. Yup, agreed -- it's a horrible crutch, useful only for dealing with legacy schemas or random third-party garbage.
  14. That was sort of my question, too.
  15. I like to strictly enforce where expressions can be used and where the can't be. Quoting an integer doesn't really hurt.
  16. I guess I'm missing what the hard part seems to be. If you assign N transactions to a batch, and store this somewhere, a simple LEFT JOIN should suffice, no?
  17. Oops, for the GROUP BY -- thanks guys.
  18. But if you're not quoting your literals, you will be open to injection attacks.
  19. No, you won't be able to do that until you're using proper date strings.
  20. That's because your table has very few records -- this is a well-documented limitation.
  21. fenway

    delete

    How? What was the error?
  22. No, you can use COUNT(*).
  23. How do you know that they're not used -- like they're not in the table?
  24. That's because you're not using SQL-99 dates. Either convert the dates in PHP, or use STR_TO_DATE() to get them into YYYY-MM-DD.
  25. There is ZERO benefit to have N sets of tables for N users. You're building partitioning at a very low level.
×
×
  • 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.