Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Why not simply: $double = mysql_query("SELECT question, COUNT(id) AS cnt FROM question GROUP BY question HAVING cnt > 1");
  2. You need to find the oldest one FIRST, and join back to your table SECOND.
  3. Should be... it's simply a modifier to SELECT.
  4. Well, what do you have now?
  5. We frown upon posting entire scripts... that's never the answer. And if it's php-related, then it doesn't belong on this board.
  6. Yup... just make sure you use UNSIGNED INT.
  7. I thought we fixed this bug... maybe it was lost during an upgrade.
  8. There's a board that discusses flat file
  9. Don't rely on the ID - not necessarily the most "recent' if anything's been updated.
  10. Actually, there are missing opening/closing backticks -- not that they should be there to begin with.
  11. Stop using persistent connections.
  12. Why are you quoting the filenames?
  13. Then you *do* have a primary key.... post the SHOW CREATE TABLE.
  14. Then push an array and join it at the end.. and PLEASE don't omit the column names.
  15. FULLTEXT is funny,... doesn't always match/return what you'd expect.
  16. Why would it only display the first one?
  17. fenway

    Not In Other Table

    Or a LEFT JOIN ... IS NULL, so as not to kill performance.
  18. You need to join those tables...
  19. I think I made a comment to this effect earlier... can you post the "working" query and then I'll modify it accordingly?
  20. Except that F.* with a group by will produce meaningless garbage... so it's not "solved", it just looks like it's working.
  21. And by "code" i hope there's an mysql query in there somewhere -- otherwise I'm moving this to a more appropriate board.
  22. Well, not exactly, but you can "cheat" by using REPLACE() to replace "hey" with a single character, and then count the difference in lengths, knowing the length of your target string. It's ugly, but it works like a charm. I've used this before to count spaces or commas.
  23. Well, don't update the PK.
  24. Why not simply run the statement in the loop, instead of concat-ing?
  25. Yup.
×
×
  • 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.