From 9678b7ed4883c187d50f22da398ca32e2d1b2171 Mon Sep 17 00:00:00 2001 From: Geoff Munn Date: Thu, 17 Sep 2009 00:07:45 +0000 Subject: [PATCH] MINOR FIX: columns quoted properly git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86510 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/SQLMap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/model/SQLMap.php b/core/model/SQLMap.php index 809a74ca8..47113cbe6 100755 --- a/core/model/SQLMap.php +++ b/core/model/SQLMap.php @@ -37,7 +37,7 @@ class SQLMap extends Object implements IteratorAggregate { public function getItem($id) { if($id) { $baseTable = reset($this->query->from); - $this->query->where[] = "$baseTable.ID = $id"; + $this->query->where[] = "\"$baseTable\".\"ID\" = $id"; $record = $this->query->execute()->first(); if($record) { $className = $record['ClassName'];