mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR FIX: columns quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86510 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
5b2eb11d4b
commit
9678b7ed48
@ -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'];
|
||||
|
Loading…
Reference in New Issue
Block a user