Delete duplicate rows by time difference

Hi all,

I have a table with item field and date created field, I need a way to detect duplicate item values then compare their date created values, then delete duplicate records with time difference less that 10 minutes. Any help would be much appreciated.

this is where i am at currently.

//gets duplicate values in item field
$duplicates = mysql_query(“SELECT item, count() FROM imsexport GROUP BY item having count() > 1”);
$count = mysql_num_rows($duplicates);
$row = mysql_fetch_assoc($duplicates);
if ($count > 0) {
$duplicate = $row[‘item’];