Hello.

I've asked on a few forums, but no replies as yet. From all the Google searches, the below MYSQL command should work. However it does not insert any 'new' records.

the URL column/field is correct & is the Primary key.

Code:
$tme=time();

$sql="INSERT INTO URLS (TYPE, URL, TIME)
 VALUES ('$type', '$url', '0')
 ON DUPLICATE KEY UPDATE
 TIME = VALUES($tme);";

if I use this, it DOES work... - However in a few days / week or so, i expect to run into duplicates & will want the time value to be updated.

Can this be done in one command ?

Code:
$sql="INSERT INTO URLS (TYPE, URL, TIME)
 VALUES ('$type', '$url', '0');
PS - i use PHP.