From f801f63a997bc29a372ef24902b3437720fe81b3 Mon Sep 17 00:00:00 2001 From: laf Date: Fri, 22 Apr 2016 14:42:33 +0000 Subject: [PATCH] Missing AND --- html/includes/api_functions.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/includes/api_functions.inc.php b/html/includes/api_functions.inc.php index 40c64a9bca..a3131c5472 100644 --- a/html/includes/api_functions.inc.php +++ b/html/includes/api_functions.inc.php @@ -1302,7 +1302,7 @@ function list_ipsec() { $message = "No valid hostname or device ID provided"; } else { - $ipsec = dbFetchRows("SELECT `D`.`hostname`, `I`.* FROM `ipsec_tunnels` AS `I`, `devices` AS `D` WHERE `I`.`device_id`=? `D`.`device_id` = `I`.`device_id`", array($device_id)); + $ipsec = dbFetchRows("SELECT `D`.`hostname`, `I`.* FROM `ipsec_tunnels` AS `I`, `devices` AS `D` WHERE `I`.`device_id`=? AND `D`.`device_id` = `I`.`device_id`", array($device_id)); $total = count($ipsec); $status = 'ok'; $code = 200;