Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. You have no join conditions!
  2. First problem -- that's not a valid mysql date format -- use STR_TO_DATE().
  3. Ah... then you need a LEFT JOIN, or NOT EXISTS.
  4. If you'd like to rank partial substring matches by distances from string position 0, that's not hard to do in application code.
  5. If it's encrypted, you'll need to decrypt it to get it back -- how you choose to encrypt is entirely up to you.
  6. There must be countless ones on this site... I could always move this thread to php board and see what comments you get there.
  7. Assuming you can get these back to timestamps, mysql has function that can convert back & forth -- but why bother to begin with?
  8. fenway

    Syntax Error

    That's called an UPDATE.
  9. All you need to do is order the query I provided, and then loop through the resultset in application code.
  10. FYI, if you ever had any other records linked to this table by UID, you'd better clear them out, or reset the auto-increment value, or you'll be sorry.
  11. That has security hole written all over it.
  12. Maybe someone else can help -- I don't feel like interpolating the variables myself when a simple echo() will suffice.
  13. If the "condition" is a null value, COALESCE() works well too.
  14. If you're asking in general how to do this, you should check out a few of the tutorials. If you have a specific question, I can't find it.
  15. Usually, you would use a derived table to grab the min(), and then join it back to the primary table.
  16. That's the less optimal solution, through.
  17. You've been given the easier solution -- one row per hit.
  18. Yes, it's the wrong place -- and more importantly, you're not describing the upload process
  19. fenway

    Query Help!!!

    Nothing wrong with short aliases... but please show us the actual query being sent to the server.
  20. If you don't have matching records, then your where clause will always be false -- you might need to move it to the ON condition.
  21. It returns one (q,a) pair per row -- that's different.
  22. How did you do it?
  23. Huh?
  24. Hmm... no ORDER BY clause?
  25. My bad... it happens. Thanks for not going bezerk. Your next 100 posts are free :-)
×
×
  • 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.