Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. UTF-8 covers most characters, unlike latin1, which you are using.
  2. fenway

    user login

    Long time no see.... I usually use a "one-time passcode", like a random hex-string of 40 characters (say, an MD5 hash of something), and e-mail it to them, and have it expire after 24 hours or when it's been used once.
  3. Sounds like you need a UNION. BTW, BIGINT is likely waaay too big... just slows down index usage. INT UNSIGNED is more than sufficient, since I doubt you'll have >4 billion records in a single table.
  4. It all depends on the cardinality of the indexes.
  5. You can't execute multiple statements that way.
  6. Nope... DISTINCT isn't even a function itself. You can filter those in PHP code.
  7. Yikes... why not use a proper DATE field?
  8. Not from a single-threaded script, no... but that's well outside the scope of the mysql board.
  9. It's not "solved" until you post the solution.
  10. Not sure... but that's outside the scope of this forum.
  11. Yup... DAY() was added in v4.1.1 -- use DAYOFMONTH() instead, it's the same function.
  12. That was instead of the loop.
  13. I prefer CONCAT_WS( '', Firstname, Lastname) -- makes it easier to add more columns.
  14. the "site" is not the "database", so no.
  15. Which version of 4?
  16. I'll second that... it's always good to know that the community is having a positive impact!
  17. Don't mess up db normalization with the hopes of a high-load environment. solve your current problem now.
  18. COUNT(*) = 1 plus 1 = 2. Where's the confusion?
  19. Yeah, I do it often for bulk inserts.
  20. They can be... especially when you're using fields from the left-joined tables. If you need left join, you have no choice.
  21. We don't need all the code... just the db statements. You're running an update statement without a where clause!
  22. I have no idea what you want.
  23. There is no "after" -- join them to begin with. SELECT a.*, ua.* FROM user_ach AS ua inner join ach AS a ON ( a.id = ua.ach_id ) LEFT JOIN cat_order AS co on ( a.name = co.cat_name ) WHERE ua.user_id = $cookie AND ua.ach_id = $counter ORDER BY co.cat_num
  24. Try doing (2) and (3) independently.
×
×
  • 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.