----- Original Message ----- From: "septic" <nrasidakis@xxxxxxxxxxx> To: <php-db@xxxxxxxxxxxxx> Sent: Wednesday, March 14, 2007 4:29 AM Subject: do not display dublicated entries > Hello all, > > I have created a simple webtracer for my website and I save some info on > mysql database. > > table = tracker > > FIELDS > ip > day > month > year > session_id > browser of visitor > page that was visited how about change the fields ip date (contain both day,month and year) session_id Browser page > What I would like to do next, is simple to create an output of that > database with the last time that every different IP has visited my website. > > the best output I have at the moment is: > > $query = "SELECT ip,day,month,year FROM tracker WHERE page = 'index' ORDER > BY `tracker`.`year` DESC , `tracker`.`month` DESC , `tracker`.`day` DESC > LIMIT 0,20 "; i think when u able to change the field.. i hope you will have easy sql select * from tracker where page='index' order by date DESC limit 0,10 other trick: select * from tracker where page='index' order by id DESC > > The problem is that I want to Keep for each different IP the fisrt entry > that is found on this output I get. > > therefore I would say that the output would represent the last visit of each > different user on my website. > > do you know of a php or sql trick to avoid entries that containt the same IP > entries ? there is no trick.. i believe is a matter of programing.. to me i using mktime() to the date (not type date) but in the end.. i should create a date than an integer. is you decision to follow me using integer ( by mktime() ) or using date. > Thanks in advance for the help. btw.. i was wondering.. you enter date but why you not enter the time. > Nikos. > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php