mysql_select_db("yourname",$linkptr);
mysql_query("update counter
set visited=visited+1 where num=2",$linkptr);
$result=mysql_query("select visited
from counter where num=2",$linkptr);
list($counter)=mysql_fetch_row($result);
$counter=sPRintf("%05d",$counter);