From fa3497f6ed54b6de16dc44ae94721f00b5d5fc6b Mon Sep 17 00:00:00 2001 From: Jörn Friedrich Dreyer Date: Sat, 25 Aug 2012 01:52:27 +0200 Subject: add backticks to SQL, use limit parameter instead of LIMIT SQL --- apps/user_ldap/appinfo/update.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/user_ldap/appinfo') diff --git a/apps/user_ldap/appinfo/update.php b/apps/user_ldap/appinfo/update.php index 9cf1814cf6f..f06655c1dc1 100644 --- a/apps/user_ldap/appinfo/update.php +++ b/apps/user_ldap/appinfo/update.php @@ -34,8 +34,8 @@ $groupBE = new \OCA\user_ldap\GROUP_LDAP(); $groupBE->setConnector($connector); foreach($objects as $object) { - $fetchDNSql = 'SELECT ldap_dn from *PREFIX*ldap_'.$object.'_mapping'; - $updateSql = 'UPDATE *PREFIX*ldap_'.$object.'_mapping SET ldap_DN = ?, directory_uuid = ? WHERE ldap_dn = ?'; + $fetchDNSql = 'SELECT `ldap_dn` FROM `*PREFIX*ldap_'.$object.'_mapping`'; + $updateSql = 'UPDATE `*PREFIX*ldap_'.$object.'_mapping` SET `ldap_DN` = ?, `directory_uuid` = ? WHERE `ldap_dn` = ?'; $query = OCP\DB::prepare($fetchDNSql); $res = $query->execute(); -- cgit v1.2.3