Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Assuming you actually store your keywords in a comma-separated list, FIND_IN_SET() will work.
  2. You'd store a relative pathname to the image itself.
  3. Oh, please don't do that... don't rely on array offsets. Use a column alias and refer to it that way.
  4. Wait, why are you storing month names?
  5. Nope, not really... pretend you have no code. What are the real conditions 1 & 2? How do they depend on "multiple" records. Please explain.
  6. Likewise... set a hard limit on the number of records to be returned, and you're set.
  7. Really? I'd be very surprised if it did that. It SHOULD prevent you from creating a unique index while dups exist. I tested it and that is the behavior on the version I'm using (5.0) It will do it you ask for it explicitly. ALTER IGNORE TABLE add unique index ( firstname, lastname, email ) will work this way -- I have made this suggestion many times.
  8. Show us the table, relevant stats, and the statement in question.
  9. And it's much easier to think about with numeric fields -- there a big difference between 0 of something (which might be true) and not specified (NULL). You can't use zero to represent both. Same goes for strings.
  10. Well, if it's just a one-time thing, you can simply add a unique index across all three columns, and mysql will take care of it for you.
  11. That's basically a SET column type -- not impossible to work with, but just a bit more complicated to update.
  12. The stickies are your friend
  13. That's not near enough info to help.
  14. I don't follow.... and you should always test the values of your expressions in the select column list too.
  15. I don't know what you mean by "program" -- the db query is relatively simple, if you show us your tables.
  16. That's true, but you can't work around it if necessary.
  17. I don't see any sample queries, so I have no idea.
  18. SELECT sum(points) from $table
  19. Mixing LEFT and RIGHT JOINs makes it very hard to follow.... but that shouldn't be an issue. Hard to say without sample data. are the JOIN plans the same (from EXPLAIN)?
  20. What do you mean by that? If you pass the DB a blank string, it will store a blank string. If you want to store "nothing", pass it NULL.
  21. And PHP doesn't tell you this?
  22. As opposed to???
  23. Use a JOIN.
×
×
  • 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.