<?php
 class vB_dB_Query_MultipleInsert extends vB_dB_Query_TableQuery { public function execSQL() : mixed { if (!$this->data_loaded) { return false; } $querystring = $this->buildQuery($this->params); if (!$querystring) { return [ 'errors' => [], false ]; } $this->logQuery($querystring); return $this->doQuery($querystring); } protected function buildQuery(array $values) : string { $queryBuilder = self::$queryBuilders[$this->db_type]; $params = $this->extractParamsFromValues($values); return $queryBuilder->makeInsertMultipleQuery($this->queryid, $values, $this->structure['forcetext'] ?? []); } protected function doQuery(string $querystring) : mixed { $results = []; $results['errors'] = []; $result = $this->db->query_write($querystring); if ($error = $this->db->error()) { $results['errors'] = $error; } else { $results[] = $result; } return $results; } } 