From 884b91b268a580940946a54a5455cf8b4a77139f Mon Sep 17 00:00:00 2001 From: francescobianco Date: Wed, 24 Feb 2021 09:42:24 +0100 Subject: [PATCH] micro update #5 --- src/Myddleware/RegleBundle/Solutions/vtigercrm.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Myddleware/RegleBundle/Solutions/vtigercrm.php b/src/Myddleware/RegleBundle/Solutions/vtigercrm.php index 651ff386e..d5b098a56 100644 --- a/src/Myddleware/RegleBundle/Solutions/vtigercrm.php +++ b/src/Myddleware/RegleBundle/Solutions/vtigercrm.php @@ -588,14 +588,16 @@ public function read($param) $nDataCall = $dataLeft - $this->limitPerCall <= 0 ? $dataLeft : $this->limitPerCall; if ($param['module'] == 'LineItem') { + $sql = 'readVtigerLineItemQuery()'; $query = $this->readVtigerLineItemQuery($param, $where, $orderBy, $nDataCall); } else { - $query = $this->getVtigerClient()->query("SELECT $queryParam FROM $param[module] $where $orderBy LIMIT $param[offset], $nDataCall;"); + $sql = "SELECT $queryParam FROM $param[module] $where $orderBy LIMIT $param[offset], $nDataCall;"; + $query = $this->getVtigerClient()->query($sql); } if (empty($query['success'])) { return [ - 'error' => 'Error: Request Failed! (' . ($query['error']['message'] ?? 'Error') . ')', + 'error' => 'Error: Request Failed! (' . ($query['error']['message'] ?? 'Error') . ' SQL: "'.$sql.'")', 'count' => 0, ]; }