Is there a way to increment a value without first doing a SELECT query, then adding 1 to it, then doing an UPDATE query?
One way is:
UPDATE table SET field = field + 1
One problem that always surfaces is that of timing ... you need to predictably know what the new value is and that no one else will inadvertantly think he's gotten the same value. One way to do that is with a transaction. Another way to do it is to SELECT the value (say it's 7) and then:
UDPATE table SET field = 8 WHERE field = 7;
If that succeeds then you know that the value "7" is yours. If it fails then you know you're racing with someone else. Wait a random period of time and try again.