Skip to content

Commit

Permalink
micro update #5
Browse files Browse the repository at this point in the history
  • Loading branch information
francescobianco committed Feb 24, 2021
1 parent 19657b8 commit 884b91b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Myddleware/RegleBundle/Solutions/vtigercrm.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
];
}
Expand Down

0 comments on commit 884b91b

Please sign in to comment.