Czy funkcja Remote ADDR w poniższym przykładzie może być zapisana w inny sposób

<?php function update() { mysql_db_query($this->database,"INSERT INTO ".$this->table." VALUES (NOW(),INET_ATON('".$REMOTE_ADDR."'))") or die("Write Error<br>".mysql_error()); "DELETE FROM ".$this->table." WHERE time < DATE_SUB(NOW(), INTERVAL $this->sec SECOND)") or die("Delete Error<br>".mysql_error()); $result = mysql_db_query($this->database,"SELECT count(DISTINCT ip) as total FROM ".$this->table) or die("Read Error<br>".mysql_error()); $this->TotalUserNum = $trows[total]; $result = mysql_db_query($this->database,"SELECT count(ip) as total FROM ".$this->table) or die("Read Error<br>".mysql_error()); $this->TotalHits = $trows[total]; } ?>
Na stronie mi wywala:
Write Error
Column 'ip' cannot be null -- pomimo, że próbuję manipulować tabelą na wszystkie sposoby.