mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Merge pull request #170 from MikePenhall/master
Update FieldEditor.php with Postgres compatible SQL syntax
This commit is contained in:
commit
831983e0a8
@ -234,9 +234,9 @@ class FieldEditor extends FormField {
|
|||||||
|
|
||||||
$sqlQuery = new SQLQuery();
|
$sqlQuery = new SQLQuery();
|
||||||
$sqlQuery = $sqlQuery
|
$sqlQuery = $sqlQuery
|
||||||
->setSelect('MAX(Sort)')
|
->setSelect("MAX(\"Sort\")")
|
||||||
->setFrom("EditableOption")
|
->setFrom("\"EditableOption\"")
|
||||||
->setWhere("ParentID = $sql_parent");
|
->setWhere("\"ParentID\" = $sql_parent");
|
||||||
|
|
||||||
$sort = $sqlQuery->execute()->value() + 1;
|
$sort = $sqlQuery->execute()->value() + 1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user