Loop though MySQL table updating visit count for each unique key
Posted on 2011-02-15
I've got an existing table, visit_tablet. Pertinent fields are User_ID, visit_date, visit_time and visit_count.
visit_count is incremented each time the user visits, so that the records for each user will have a 1 for the first visit, a 2 for the second and so on. Lots of records exist and visit_Count needs to be recalculated in all records.
I need the php code to loop though the mySQL table and update the visit_count.