10 class ViewCountUpdate
{
17 function ViewCountUpdate( $pageid ) {
18 $this->mPageID
= $pageid;
25 global $wgDisableCounters;
26 if ( $wgDisableCounters ) { return; }
27 $db =& wfGetDB( DB_MASTER
);
28 $lowpri = $db->lowPriorityOption();
29 $sql = "UPDATE $lowpri cur SET cur_counter=(1+cur_counter)," .
30 "cur_timestamp=cur_timestamp WHERE cur_id={$this->mPageID}";
31 $res = $db->query( $sql, "ViewCountUpdate::doUpdate" );