mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Merge pull request #169 from MikePenhall/master
Escaped addField() query to work with Postgres
This commit is contained in:
commit
151def76dc
@ -188,9 +188,9 @@ class FieldEditor extends FormField {
|
|||||||
|
|
||||||
$sqlQuery = new SQLQuery();
|
$sqlQuery = new SQLQuery();
|
||||||
$sqlQuery = $sqlQuery
|
$sqlQuery = $sqlQuery
|
||||||
->setSelect('MAX(Sort)')
|
->setSelect("MAX(\"Sort\")")
|
||||||
->setFrom("EditableFormField")
|
->setFrom("\"EditableFormField\"")
|
||||||
->setWhere("ParentID = $parentID");
|
->setWhere("\"ParentID\" = $parentID");
|
||||||
|
|
||||||
$sort = $sqlQuery->execute()->value() + 1;
|
$sort = $sqlQuery->execute()->value() + 1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user