diff --git a/extension/Classes/Core/Database/Database.php b/extension/Classes/Core/Database/Database.php index f78282980165641f512d915bcee53b44f84f1c4a..30eced3a0c2e2896b00b427a3c55cde25c9244d9 100644 --- a/extension/Classes/Core/Database/Database.php +++ b/extension/Classes/Core/Database/Database.php @@ -441,7 +441,6 @@ class Database { case 'SHOW': case 'DESCRIBE': case 'EXPLAIN': - case 'CALL': if (false === ($result = $this->mysqli_stmt->get_result())) { throw new \DbException( json_encode([ERROR_MESSAGE_TO_USER => 'Error DB execute', ERROR_MESSAGE_TO_DEVELOPER => '[ mysqli: ' . $this->mysqli_stmt->errno . ' ] ' . $this->mysqli_stmt->error . $specificMessage]), @@ -454,6 +453,20 @@ class Database { $count = $stat[DB_NUM_ROWS]; $msg = 'Read rows: ' . $stat[DB_NUM_ROWS]; break; + case 'CALL': + $result = $this->mysqli_stmt->get_result(); + $queryType = QUERY_TYPE_SELECT; + If($result === false){ + $stat[DB_NUM_ROWS] = 0; + $count = $stat[DB_NUM_ROWS]; + $msg = 'Read rows: ' . $stat[DB_NUM_ROWS] . '(No SELECT statement)'; + }else{ + $this->mysqli_result = $result; + $stat[DB_NUM_ROWS] = $this->mysqli_result->num_rows; + $count = $stat[DB_NUM_ROWS]; + $msg = 'Read rows: ' . $stat[DB_NUM_ROWS]; + } + break; case 'REPLACE': case 'INSERT': $queryType = QUERY_TYPE_INSERT;