From c1c96e01fab131dd48cd68cdd9b63639e269d9c8 Mon Sep 17 00:00:00 2001 From: Florian Steinel Date: Thu, 27 Oct 2016 02:41:32 +0200 Subject: sql: limit 1 for UPDATE and DELETE is not supported by the SQL standard and postgresql (see: https://www.postgresql.org/message-id/flat/1291109101.26137.35.camel%40pcd12478 ) --- install/update.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'install/update.php') diff --git a/install/update.php b/install/update.php index fc6641c55..7e7104b74 100644 --- a/install/update.php +++ b/install/update.php @@ -1095,7 +1095,7 @@ function update_r1097() { $r = q("select hubloc_id, hubloc_addr from hubloc where hubloc_addr like '%%/%%'"); if($r) { foreach($r as $rr) { - q("update hubloc set hubloc_addr = '%s' where hubloc_id = %d limit 1", + q("update hubloc set hubloc_addr = '%s' where hubloc_id = %d", dbesc(substr($rr['hubloc_addr'],0,strpos($rr['hubloc_addr'],'/'))), intval($rr['hubloc_id']) ); @@ -2462,4 +2462,4 @@ function update_r1183() { if($r1 && $r2) return UPDATE_SUCCESS; return UPDATE_FAILED; -} \ No newline at end of file +} -- cgit v1.2.3