AUTO INSERT DATABASE IP Adress
Last Updated: May 07 2015 09:58, Started by
MARIUSEF
, May 07 2015 09:53
·
0
#1
Posted 07 May 2015 - 09:53
<?php $timp_login_guest = time(); $ip_login_guest = $_SERVER['REMOTE_ADDR']; mysql_query("INSERT INTO `guest`(`ip_guest`, `username`, `last_action_guest`) VALUES('$ip_login_guest','user','$timp_login_guest')") or die(mysql_error()); ?>-sa nu mai INSEREZE daca IPul vizitatorului exista in baza de date -dupa 24 de ore sa fie stearsa coloana sau linia(nu stiu exact cum se zice:P) pt vizitatorul respectiv |
#2
Posted 07 May 2015 - 09:58
1. faci ip ul coloana unica si inserezi cu INSERT INGNORE
2. pai tu nu faci diferenta intre o linie si o coloana ? Ori iti faci un script care curata permanent baza de date , ori http://dev.mysql.com.../en/events.html |
Anunturi
Bun venit pe Forumul Softpedia!
▶ 1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users