Fixed DB quoting (mainly for non-MySQL compat)

This commit is contained in:
Ingo Schommer 2013-03-11 15:20:55 +01:00
parent 38c99fc66b
commit ebcd6caa26

View File

@ -45,7 +45,7 @@ class DMSDocument extends DataObject implements DMSDocumentInterface {
function addPage($pageObject) {
$this->Pages()->add($pageObject);
DB::query("UPDATE DMSDocument_Pages SET DocumentSort=DocumentSort+1 WHERE SiteTreeID = $pageObject->ID");
DB::query("UPDATE \"DMSDocument_Pages\" SET \"DocumentSort\"=\"DocumentSort\"+1 WHERE \"SiteTreeID\" = $pageObject->ID");
}
/**