From: Rob Church Date: Mon, 16 Jan 2006 13:03:26 +0000 (+0000) Subject: Fix problem reported on mailing list where re-initialising stats didn't work (can... X-Git-Tag: 1.6.0~514 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=fdf3b869253fd280a38ecb740ebe0e8a194205c4;p=lhc%2Fweb%2Fwiklou.git Fix problem reported on mailing list where re-initialising stats didn't work (can't insert duplicate rows with the same id field) --- diff --git a/maintenance/initStats.php b/maintenance/initStats.php index 85804596be..7e02f48dfe 100644 --- a/maintenance/initStats.php +++ b/maintenance/initStats.php @@ -16,6 +16,7 @@ $pages = $dbr->selectField( 'page', 'COUNT(page_id)', echo "$wgDBname: setting edits $edits, pages $pages\n"; $dbw =& wfGetDB( DB_MASTER ); +$dbw->delete( 'site_stats', array( 'ss_row_id' => 1 ) ); $dbw->insert( 'site_stats', array( 'ss_row_id'=> 1, 'ss_total_views' => 0,