In MySQL, is there a way to run a single query that will insert only if a key doesn't already exist?
The query keeps bitching at me for trying to put a WHERE clause on an INSERT but there has to be a better way than going to the database twice (select and check row count and then insert if 0), right?