Fix select semplificati

This commit is contained in:
Thomas Zilio 2019-02-22 16:03:06 +01:00
parent 7f1a7e1d87
commit b3f5faba30
1 changed files with 1 additions and 17 deletions

View File

@ -442,7 +442,7 @@ class Database extends Util\Singleton
// Valori da ottenere
$select = [];
foreach ((array) $array as $key => $value) {
$select[] = $value.(is_numeric($key) ? '' : ' AS '.$this->quote($key));
$select[] = $value.(is_numeric($key) ? '' : ' AS '.$key);
}
$select = !empty($select) ? $select : ['*'];
@ -651,20 +651,4 @@ class Database extends Util\Singleton
return true;
}
/**
* Prepara il campo per l'inserimento in uno statement SQL.
*
* @since 2.3
*
* @param string $value
*
* @return string
*/
protected function quote($string)
{
$char = '`';
return $char.str_replace([$char, '#'], '', $string).$char;
}
}