In a SQL query I use the (MySQL database)
INSERT ... UPDATE ON DUPLICATE KEY
statement in order to insert or update.
I would like to know if an insert has been made or an update.
I use mysql_insert_id() but the problem I am having is that it does return the row id whether I am inserting or updating.