I\'m using MySQL 5.1 hosted at my ISP. This is my query
mysql_query(\"
IF EXISTS(SELECT * FROM licensing_active WHERE title_1=\'$title_1\') THEN
BEGIN
This should do the trick for you:
insert into
licensing_active (title_1, time)
VALUES('$title_1', '$time')
on duplicate key
update set time='$time'
This is assuming that title_1 is a unique column (enforced by the database) in your table.
The way that insert... on duplicate works is it tries to insert a new row first, but if the insert is rejected because a key stops it, it will allow you to update certain fields instead.