65 $this->parameters = array();
98 $numberOfVariables = strlen($types);
99 if (func_num_args() !== $numberOfVariables + 1) {
103 $this->parameters = array(
109 for ($i = 1; $i < $numberOfVariables; $i++) {
110 $this->parameters[] = array(
111 'type' => $types{$i},
112 'value' => func_get_arg($i + 1),
134 $queryParts = $this->queryComponents[
'queryParts'];
135 $numberOfParameters = count($this->parameters);
136 for ($i = 0; $i < $numberOfParameters; $i++) {
137 $value = $this->parameters[$i][
'value'];
138 switch ($this->parameters[$i][
'type']) {
140 if ($value !== NULL) {
141 $value = $this->databaseConnection->fullQuoteStr($value, $this->queryComponents[
'ORIG_tableName']);
145 $value = (int)$value;
149 throw new \InvalidArgumentException(sprintf(
'Unknown type %s used for parameter %s.', $this->parameters[$i][
'type'], $i + 1), 1281859196);
152 $queryParts[$i * 2 + 1] = $value;
156 $query = implode(
'', $queryParts);
158 $limit = $this->queryComponents[
'LIMIT'];
159 if ($this->databaseConnection->runningADOdbDriver(
'postgres')) {
163 if ($splitLimit[1]) {
165 $numRows = $splitLimit[1];
166 $offset = $splitLimit[0];
167 $limit = $numRows .
' OFFSET ' . $offset;
173 if ($splitLimit[1]) {
175 $numRows = $splitLimit[1];
176 $offset = $splitLimit[0];
178 $numRows = $splitLimit[0];
181 $this->recordSet = $this->databaseConnection->handlerInstance[$this->databaseConnection->lastHandlerKey]->SelectLimit(
$query, $numRows, $offset);
182 $this->databaseConnection->lastQuery = $this->recordSet->sql;
184 $this->databaseConnection->lastQuery =
$query;
185 $this->recordSet = $this->databaseConnection->handlerInstance[$this->databaseConnection->lastHandlerKey]->_Execute($this->databaseConnection->lastQuery);
188 if ($this->recordSet !== FALSE) {
190 $this->recordSet->TYPO3_DBAL_handlerType =
'adodb';
206 return $this->recordSet !== FALSE ? $this->recordSet->_fieldobjects : array();
215 $row = $this->databaseConnection->sql_fetch_assoc($this->recordSet);
226 return $this->databaseConnection->sql_data_seek($this->recordSet, $offset);
235 return $this->databaseConnection->sql_free_result($this->recordSet);
248 $output = $this->databaseConnection->sql_errno();
251 $output = $this->databaseConnection->sql_error();
254 $output = $this->databaseConnection->sql_num_rows($this->recordSet);
257 throw new \RuntimeException(
'Cannot access property ' . $name, 1394631927);
bind_param($types, $var1, $_=NULL)
static intExplode($delimiter, $string, $removeEmptyValues=FALSE, $limit=0)
__construct($query, array $queryComponents, \TYPO3\CMS\Dbal\Database\DatabaseConnection $databaseConnection)