Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. There are some excellent stickies on this topic.
  2. I'm confused again... sorry, it's been a while. This gets your clubs for 18 months (though I don't see where the 2 event criterion is satisfied): SELECT r.club, DATEDIFF( MAX( date ) , MIN( t.date ) ) AS diff FROM racing r INNER JOIN tournament t ON ( t.enumber = r.event ) WHERE t.date >= '2007-01-01' AND r.besttime < 99.999 GROUP BY r.club HAVING diff > 4 Now, the next step you want to do is a) limit this to 12 months and, more importantly, b) just get the min() of some column?
  3. Not all fields, and not all separate indexes.... but yes, sometimes for a certain query, it has to be optimized "separately".
  4. Pseudo-random, yes.
  5. You can use IFNULL( dc.division_name, d.division_name ).
  6. fenway

    Timestamp

    Don't double-post.
  7. If you're talking about weighting your search results, you'll have to design this.
  8. Don't do that...mysql has built-in date functions. What's e-day? A timestamp?
  9. Why not use REPLACE?
  10. How about transcatiosn?
  11. I have no idea what you mean.
  12. Why count(id) and not count(*)?
  13. Are you talking about ordering the results after the match?
  14. Then you'll have to JOIN as many levels down (or up) as you need... there's no recursive solution in this case.
  15. I'm not a big fan of re-posting question to multiple forums -- solution is here; next time, please let us know when to stop wasting our time.
  16. Why are we talking about imaginary queries? I still don't understand.
  17. Maybe now I see what you mean... you want to count down multiple levels of hierarchy?
  18. I don't understand.
  19. You can use MIN(0, <your-expression>) and MAX(16475715,<your-expression)
  20. How about adding mysql_error() to that die() statement?
  21. Maybe you are confusing mysql's DATE() function -- which extracts the date portion of a DATETIME column -- and php's date function.
  22. fenway

    Advice

    Depends which version of mysql -- version 5 has index_merge, and might be smart -- impossible to tell without table structure and EXPLAIN output.
  23. Sounds like you have the wrong password. You should be able to start the server and skip priviledges to fix this.
  24. I'm confused... how do you mean?
×
×
  • 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.