I have a SQL query that creates an ID:
insert into category(related,text) values(?,?)
on duplicate key update id=last_insert_id(id)
I then get my ID:
$id=$connect->lastinsertid()
Is there a way to distinguish between an ID that was found as a duplicate and one that is brand new using the query?