From: Greg Sabino Mullane Date: Thu, 9 Nov 2006 01:04:57 +0000 (+0000) Subject: Add "create table AS" for increased db portability. X-Git-Tag: 1.31.0-rc.0~55243 X-Git-Url: http://git.cyclocoop.org//%22%22.str_replace%28%27%22%27%2C?a=commitdiff_plain;h=b90087d043acba457127583597ab4b8cbbe4cbaf;p=lhc%2Fweb%2Fwiklou.git Add "create table AS" for increased db portability. --- diff --git a/includes/Article.php b/includes/Article.php index 73f0585b68..cc2a5d93fc 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -2458,7 +2458,7 @@ class Article { if ($wgDBtype == 'mysql') $dbw->query("LOCK TABLES $hitcounterTable WRITE"); $tabletype = $wgDBtype == 'mysql' ? "ENGINE=HEAP " : ''; - $dbw->query("CREATE TEMPORARY TABLE $acchitsTable $tabletype". + $dbw->query("CREATE TEMPORARY TABLE $acchitsTable $tabletype AS". "SELECT hc_id,COUNT(*) AS hc_n FROM $hitcounterTable ". 'GROUP BY hc_id'); $dbw->query("DELETE FROM $hitcounterTable");