Проверка IP по датам перед вставкой в таблицу

PHP:
$v_id = $ _SERVER ['REMOTE_ADDR'];
$query = "SELECT id FROM ios_pos WHERE id = ".$v_id;
$result = mysql_query($query, dbconnect());
$row=mysql_fetch_row($result);
if($row[0])
continue;

$query = "INSERT INTO ios_pos (id,time,ip) VALUES('".$id."','".$time."','".$ip."')";
$mysqlresult=MySQL_Query("select * from `ios_user` WHERE `email`='$v_name'", dbconnect());
$UID=MySQL_result($mysqlresult,0,'ID');

$result = mysql_query($query, dbconnect());
 
Назад
Сверху