Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. How do you know for certain that there's no lock contention?
  2. It's a bit tricky... do you have an integers table? Because you'll need to generate "rows" for each of the dates in the date range you want before you'll be able to make the grid.
  3. What do you have so far?
  4. fenway

    mysql search.

    Sorry -- I found that here.
  5. Slow down there. One problem at a time. "sum of each individual currencies in purchases for a specific user id where Sold != '1' " == simple SUM() with a GROUP BY on currencyID with a where on user_id = <whatever> and sold != 1 Get that working first... that should be quite simple.
  6. That's not the way these forums work.
  7. Yes, it should have worked.
  8. Well, if you use group by tournamentID with MAX(), you'll get the player who won for each... then if you wrap this again, you should be able to COUNT() with GROUP BY userID.
  9. Your group by expression doesn't make any sense... why not use DATE().
  10. fenway

    [SOLVED] LIKE

    You can't, really.... there's no way to find these values without inspecting each row.
  11. Try this: SELECT * FROM `rank` as r INNER JOIN `products`AS p USING ( `book_ISBN` ) ORDER BY r.`RankUK` ASC
  12. Well, you'll need a JOIN... could you post the relevant table structures?
  13. The problem is that they're unique before you clean them up, so DISTINCT won't help you. I'm surprised your design doesn't include a "clean" customer name (or at least a FK).
  14. Except that TEXT is the wrong choice for sure.
  15. fenway

    mysql search.

    You mean like this?
  16. Good catch... id as varchar....!!
  17. fenway

    mysql search.

    Intelligent full-text searches are very poorly supported by native mysql -- look at sphinx or lucene.
  18. You're using GROUP BY -- you can't then examine anything other than aggregate functions. So the other columns have meaningless values in them.
  19. Shouldn't be... one count per keyword.
  20. Without salts, "good" passwords aren't helpful.
  21. The search on books by title + by name -- then join this back to whatever other tables yo uwant.
  22. Try this: SELECT s.driver_id, s.sched_id, d.first_name, d.last_name FROM schedule AS s INNER JOIN drivers AS d USING ( driver_id ) WHERE s.car_id = '$car_id' and s.sched_date = '$weekDate';
  23. fenway

    [SOLVED] LIKE

    If you start with a %, you're doing a substring search -- which means you can't use an index, EVER.
  24. Why not just UNION the two search results?
  25. First, you don't need distinct, since it's already group-by'ed. Second, you can easily accomplish "hit counters" with and INSERT... ON DUPLICATE KEY... UPDATE...
×
×
  • 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.