Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. I can't guess what that query is going to do.
  2. That's very complex -- you'd have to break up each period into days, and then compare each hour against "valid" hours.
  3. Depends how 'remote' it is.
  4. In general, you can use TIMEDIFF() and then TIME_TO_SEC(). But if you want further restrictions, you'll need to break up each datetime into business and non-business parts first.
  5. This topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=350577.0
  6. I didn't realize that was the the primary index -- are you really returning that many rows?
  7. For update, it's often required -- but without seeing the statements, I can't be certain.
  8. You're missing an index on the "s" table.
  9. fenway

    Query Problem

    If the spaces are simply delimiters, then you can hack it -- replace() spaces with commas, then use FIND_IN_SET(). But you really should fix your table.
  10. I have no idea what you're talking about. Echo the actual queries, and we'll see if anyone can help.
  11. utf8_general_ci is pretty "general".
  12. Everyone wants help -- but it's a free forum -- don't report-- that's against the rules.
  13. It's always better to start off normalized.
  14. AND where's the "IS NULL" part from the original link I gave you?
  15. Using one table is just plain lazy.
  16. Sorry, I don't follow...?
  17. Store as many decimal places as you actually need -- then they aren't "extra".
  18. fenway

    SQL is rusty

    You may have none that you like, but you defintely have something.
  19. Then you created them incorrectly. But that wasn't your problem -- your problem was that you think that you're getting duplicates.
  20. It's always easy to make things "more normalized" later.
  21. I don't believe you that you're getting duplicates in any table with a UNIQUE key. And if "something" gave you that create table structure, it's wong.
  22. Then try "a.date < b.date" instead.
  23. Yeah, it's not pretty -- but there is little you can do if you want all the results co-dependent.
  24. What's "it"?
  25. You'll have to consult the mysql refman for syntax -- I assume that's where you got "MATCH..AGAINST" from.
×
×
  • 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.