scomprobarIP = "SELECT hitIP FROM hits where hitIP='xxx.xxx.xxx.xxx'" ; $res = mySQL_query($comprobarIP); if (mysql_num_rows($res) == 0) { mysql_query("UPDATE hits SET = hitTotal + 1") }