I would like to insert data to the DB only if it's not already exist. so I'm using INSERT IGNORE.
The problem is with field "createDate" - it's change every second and that's turn the new data to be new/unique. Is there any way to set the comparison fields for the SQL ?
$res = mysql_query ("INSERT IGNORE INTO `alerts` (userID, type, refID, title, openBy, createDate) VALUES (".$mainIndex['userID'].", 'comment', ".$mainIndex['id'].", '".$contactName."', ".$mainIndex['userID'].", ".$todayLX.")");