Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Are you the only one working with these tables? Do you ever issue explicit LOCK statements? Is maintenance happening concurrently on the production DB?
  2. What did you do to trigger the error? Presumably to the parent row...
  3. Let's see the solution....?
  4. What output do you get from your UNION statement?
  5. Any number of reasons... innodb or myisam?
  6. I can't read that query... if you format it a bit better, then perhaps someone else (or I) will be able to figure it out.
  7. Why not SELECT DISTINCT site, device?
  8. What's not counting them?
  9. That's a bit hard to read, but yes, you should be able to modify your WHERE clause the way you suggest -- did it not work?
  10. First, $results doesn't even exist. Second, $result in a RECORDSET... you need to grab the column you want, either with mysql_result() or mysql_fetch_assoc().
  11. That's right... you need to use mysql_result($count,0,0) to get the count itself.
  12. What's the error? Where are the column names?
  13. Well you can order by 135... but the result will be the same than like without Actually, it will order by the 135th column in the select list; 135 wasn't quoted in your example. Did you actually try this? It will work.
  14. You have single quotes around table names and columns... drop them.
  15. You need to use this: SELECT q.* FROM RQquestions AS q LEFT JOIN RQanswered AS a ON ( q.ID = a.qID AND a.userID = '1180540351' ) WHERE a.qID IS NULL ORDER BY RAND( ) Since a.userID always will be null in this LEFT JOIN.
  16. Interesting use of DISTINCT... never thought of that.
  17. Huh?
  18. I disagree.... you can order by anything you want.`
  19. Sorry, I just re-read the query... COUNT() counts every _matching_ row it encounters in _any_ table, hence MxN. How about this? (very untested) SELECT count(*), SUM (sub.plays) FROM ( SELECT champion, arcade_games.plays FROM arcade_games LEFT JOIN arcade_plays ON arcade_games.champion = arcade_plays.player ) AS sub GROUP BY sub.champion
  20. Are you sure?
  21. See this thread.
  22. version 5.1 has an event scheduler....
  23. You could add a UNIQUE idex.
×
×
  • 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.