ZenBlender
2006-10-01 09:14:35 UTC
SELECT * FROM x WHERE id=y
I check to see if any rows are returned. If there are, I then execute an UPDATE, and if not, I do an INSERT.
I'd love to have a basic template that does the check and incorporates the UPDATE and INSERT operations into a single MySQL query rather than doing it in an external language like java or php.