$q=mysql_query("select * from videolar where videoadresi='$videoadresi'"); if (mysql_num_rows($q)==0) { mysql_query("insert into ******** "); }