This code: would allways insert the Row, never detect that exists
$r = mysql_query("INSERT IGNORE INTO facebook (uid,fid) VALUES ('".$_SESSION['id']."','".$persone['id']."')") or die(mysql_error());
why?
Edit: Please not, the input vales are allways the same
INSERT IGNOREworks on primary key fields only. If yourfacebooktable does not have primary key set, you can do it like this:After this,
INSERT IGNOREwon’t insert duplicated lines.