select less fields from sql.
[mediawiki.git] / includes / ViewCountUpdate.php
blob16976f11b0f209eb46164adb855f8ef0d441507f
1 <?php
2 # $Id$
3 # See deferred.doc
4 class ViewCountUpdate {
6 var $mPageID;
8 function ViewCountUpdate( $pageid )
10 $this->mPageID = $pageid;
13 function doUpdate()
15 global $wgDisableCounters, $wgIsMySQL;
16 if ( $wgDisableCounters ) { return; }
17 $lowpri=$wgIsMySQL?"LOW_PRIORITY":"";
18 $sql = "UPDATE $lowpri cur SET cur_counter=(1+cur_counter)," .
19 "cur_timestamp=cur_timestamp WHERE cur_id={$this->mPageID}";
20 $res = wfQuery( $sql, DB_WRITE, "ViewCountUpdate::doUpdate" );