Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Just add yet another join.
  2. You'd have to run another query on this output as a dervied table to figure it out -- and I'd use column aliases in general.
  3. Well, then EXPLAIN the inner queries.
  4. Just a multi-table update, with the "uid" as the ON clause.
  5. Wait -- you're adding tables dynamically too?
  6. Well, still, DECIMAL is the correct choice -- as for validation, that's not mysql's fault.
  7. Your strings aren't quoted.
  8. See here -- trivial to use date math and generate what you need.
  9. How about a simple encrypt/decrypt of a test string/
  10. Why not a simple UPDATE query?
  11. VARCHAR will accept anything -- I don't believe it.
  12. Sounds like you need an EAV table.
  13. The refman is your friend!
  14. Why would you be adding columns DYNAMICALLY?!?!?
  15. SELECT LOG10(`votes`)+(-1*(TIMESTAMPDIFF(SECOND,'2010-01-19 11:00:00',`published`))/45000) AS ranking FROM post ORDER BY ranking DESC;
  16. Not sure... whatever's throwing that failed dependency error .
  17. Is this a one-time thing? Why are they the same in both tables?
  18. You don't want FLOAT, you want DECIMAL... which version?
  19. Well, my approach involves generating a table, on the fly, of years and months for the range you want -- the rest is easy.
  20. Why not just copy over the log? Or use replication?
  21. Yeah, that's more tricky... you'll have create a derived table contain a row for each month required, and then LEFT JOIN that in. Easy to do if you have an integers table lying around.
  22. No kidding... SELECT * FROM EVENT_TABLE where EVENT_TYPE_ID IN( 1,2,3, 6, 10, 11, 13, 15, 16, 34);
  23. FULLTEXT is funny if you don't have a lot of records -- also, what's your min_word_length?
  24. Sorry, I don't actually see an error here.
  25. You can't do that -- that' a cartesian product. You need to JOIN the two tables, and then, depending on what's in that column, use COALESCE().
×
×
  • 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.