Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. I guess the question I have is why you care if it updates "nothing".
  2. Oh... I see what you're doing. You're trying to merge the logic for create & update. That's less than ideal in the long term.
  3. That's because you're mixing comma and JOIN operators -- and now you're using mysql 5. The precedence of the operators has changed. Easiest way to hack this for now is to wrap all of the tables "joined" with a comma in parentheses; long term, you should properly rewrite the query..
  4. If that table doesn't have a lot of rows (i.e. 50% match), FULLTEXT doesn't work well.
  5. Then use LOCATE().
  6. It's sounds like you're asking how to write a php script.
  7. Top-right?
  8. Well, if you're doing a dumb string match, then sure, you can see if substring matches are true or false for each column.
  9. You're talking about locking -- there are optimistic and pessimistic versions.
  10. That's a PHP error.
  11. Yikes... hard to follow that... I'd re-write in proper ansi-join format (using INNER JOIN and ON clauses).
  12. Sorry, now I'm really confused -- you're setting the old values to the new values, and they're exactly the same, so of course nothing has changed.
  13. Define "twice" -- are you sure there is a many-to-one relationship/
  14. Not enough information -- and don't ask for "urgent" help, it's against the rules -- consider this a warning.
  15. That's because it's an inner join -- you want UNION.
  16. Match how?
  17. PKs should usually be integers.
  18. I don't see a call to mysql_select_db().
  19. Confirm that command-line interaction with mysql is ok.
  20. Can't you just see if the column value changed?
  21. Write them as though they were sub-selects.
  22. And then you could still initialize the user variable in the query as I suggested earlier.
  23. OK, here's the issue -- the GROUP BY clause. The counter makes no sense this way. You have duplicate rows for the same user value -- why?
×
×
  • 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.