Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. CASE WHEN rank > 11 AND rank < 50 THEN glorypoints = glorypoints + 1 WHEN rank > 0 AND rank < 12 THEN glorypoints = glorypoints + 2 END CASE ...etc.
  2. Ignoring the fact that this isn't a good idea in the first place, the issue is likely quoting. You need mysql_real_escape_string().
  3. This best handed with CASE.
  4. There's no "log of a negative number is imaginary" forum.
  5. If you set your variable with ( SELECT @yourVar := 'yourValue' ) in a derived table, it's easier.
  6. Yet another table, with competition_id and book_id.
  7. That's a math issue, not a mysql issue.
  8. Well, i'm just wondering how you're query for such dat.
  9. Ah, yes -- with JOINs -- are you familiar with these?
  10. I mean that if you query for "truth", instead of storing "state", there will be no book_selected field to update.
  11. It's always bothered me that you can't use a derived temporary table.
  12. HuH/
  13. I don't follow.
  14. Post the actual, raw query, not php code.
  15. Don't store flags in the db.
  16. Next time, how about posting your solution ?
  17. None of this matters. You need to store a clean version of your strings, depending on how you're searching. Substring matches depend on the content, same with the definition of "alphanumeric', the list goes on. Without true full-text searching (i.e. stemming, etc.), this is all smoke and mirrors.
  18. Cron jobs are much, much, much more reliable than replication.
  19. Yeah, but that's evil data storage.
  20. You're new -- next time, use code tags.
  21. Did you explicit grant the drop privilege?
  22. There are countless blog posts on this kind of thing.
  23. Something similar... but you can make that variable in the WHERE clause, and thus it's a single statement.
  24. You just need to join twice, and count the number of posts.
  25. I mean inline, in the same query.
×
×
  • 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.