I've built up a website with tons of dumplinks, the clicks on the links are counted. Building on the adminpart at the moment, trying to figure out how I could reset all these clicks in the database in a good way. This far I've just figured this solution out which I really don't think is good:
$result4 = @mysql_query('SELECT id, clicks FROM links ORDER by id DESC');
$a=0;
while (mysql_fetch_array($result4)){
$sql2 = "UPDATE links SET clicks = 0";
mysql_query($sql2);
$a++;
}
Could anyone suggest a better method? I doubt this will work forever when I have more links. :bemused:
Ps. Sorry about the English, not my native language.
Ds.