Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. How is that helpful? We just metioned above that you CAN'T use * with GROUP BY...
  2. I don't see why it wouldn't work.
  3. This one... there are hundreds of resources posted in the stickes on this board. For now, try this: SELECT * FROM `table` WHERE `surname` IN (SELECT `surname` FROM `table` WHERE `status` = 'confirmed' GROUP BY `surname` HAVING COUNT(*) > 1) AND `status` = 'confirmed' ORDER BY `surname`
  4. Well, to insert into 2 tables you need 2 insert statements, so there's "other way". I would print out a location header to make sure that it doesn't get POSTed twice.. .but that's not a mysql issue anymore.
  5. Then add a WHERE clause to the subselect.
  6. fenway

    mysql_close()

    From the refman:
  7. Posting gobs of code isn't helpful in the least... post the lines around the error message.
  8. The query posted earlier should work.
  9. Yikes... an UPDATE with no WHERE clause....
  10. Where's the group by?
  11. So you're not joining the tables on a UID? That's not going to be fun for performance. Either way, it's a straight-forward join, and after that, the display is up to you.
  12. It's a LEFT JOIN...there should be no issue.
  13. So use ORDER BY percentage DESC, (wins+losses) desc limit 1
  14. Try: CONCAT_WS( ' ', (IFNULL(user.first,'') IFNULL(user.last,'')) AS c
  15. Display is not a mysql issue.
  16. I was thinking that any update to a revision would change the timestamp but not the uid. Anyway, you could still do it with max/min, but you'd have to join them back to the main table to get the details on eacah page.
  17. You can not use * with GROUP BY.
  18. You can use AND, OR in your WHERE clause.
  19. NOT IN? Use a left join instead.
  20. Such as?
  21. Not that helpful... echo mysql_error()... but I would guess it's an escaping issue.
  22. With a join on flag_id.
  23. You have a timestamp... why use the id?
  24. Run what?
×
×
  • 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.