Project

General

Profile

Task #83414 » typo3-7.6-DatabaseConnection-MariaDB.diff

Ayke Halder, 2020-09-22 10:46

View differences:

typo3/sysext/core/Classes/Database/DatabaseConnection.php 2018-07-12 13:01:26.000000000 +0200 → typo3/sysext/core/Classes/Database/DatabaseConnection.php 2020-09-22 10:41:07.363800363 +0200
// Quote and escape values
$fields_values = $this->fullQuoteArray($fields_values, $table, $no_quote_fields, true);
// Build query
$query = 'INSERT INTO ' . $table . ' (' . implode(',', array_keys($fields_values)) . ') VALUES ' . '(' . implode(',', $fields_values) . ')';
$query = 'INSERT INTO ' . $table . ' (`' . implode('`,`', array_keys($fields_values)) . '`) VALUES ' . '(' . implode(',', $fields_values) . ')';
// Return query
if ($this->debugOutput || $this->store_lastBuiltQuery) {
$this->debug_lastBuiltQuery = $query;
......
$hookObject->INSERTmultipleRows_preProcessAction($table, $fields, $rows, $no_quote_fields, $this);
}
// Build query
$query = 'INSERT INTO ' . $table . ' (' . implode(', ', $fields) . ') VALUES ';
$query = 'INSERT INTO ' . $table . ' (`' . implode('`,`', $fields) . '`) VALUES ';
$rowSQL = [];
foreach ($rows as $row) {
// Quote and escape values
......
// Quote and escape values
$nArr = $this->fullQuoteArray($fields_values, $table, $no_quote_fields, true);
foreach ($nArr as $k => $v) {
$fields[] = $k . '=' . $v;
$fields[] = '`' . $k . '`=' . $v;
}
}
// Build query
......
$queryParts = [];
foreach ($searchWords as $sw) {
$like = ' LIKE \'%' . $this->quoteStr($this->escapeStrForLike($sw, $table), $table) . '%\'';
$queryParts[] = $table . '.' . implode(($like . ' OR ' . $table . '.'), $fields) . $like;
$queryParts[] = $table . '.`' . implode(('`' . $like . ' OR ' . $table . '.`'), $fields) . '`' .$like;
}
$query = '(' . implode(') ' . $constraint . ' (', $queryParts) . ')';
    (1-1/1)