I have a cron job that crawls a website every 15 mins and returns information on a number of entries. I have an ON DUPLICATE KEY UPDATE statement to deal with whether to insert or update an entry. I want to add a scheduled event to each new insert giving it an expiration time.
Is there a way to check to see if an event already exists that I can check for and assign or not based on the result? Or will I have to break up my INSERT...ON DUPLICATE KEY UPDATE statement to where I check for the rows existence, and then INSERT and add the scheduled event if it doesn't exist?