From b90087d043acba457127583597ab4b8cbbe4cbaf Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Thu, 9 Nov 2006 01:04:57 +0000 Subject: [PATCH] Add "create table AS" for increased db portability. --- includes/Article.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); -- 2.20.1