Feature #23051 » fullQuoteStr.diff
t3lib/class.t3lib_db.php (working copy) | ||
---|---|---|
$arr[$k] = $this->fullQuoteStr($v, $table);
|
||
}
|
||
}
|
||
$columns = $this->getColumns($table);
|
||
$arr = array_intersect_key($arr, $columns);
|
||
return $arr;
|
||
}
|
||
function getColumns($table) {
|
||
$res = $this->sql_query('SHOW COLUMNS FROM `'.$this->quoteStr($table, $table).'`');
|
||
if ($this->debugOutput) {
|
||
$this->debug('getColumns');
|
||
}
|
||
$output = array();
|
||
if (!$this->sql_error()) {
|
||
while ($row = $this->sql_fetch_assoc($res)) {
|
||
$output[$row['Field']] = TRUE;
|
||
}
|
||
$this->sql_free_result($res);
|
||
}
|
||
return $output;
|
||
}
|
||
/**
|
||
* Substitution for PHP function "addslashes()"
|
||
* Use this function instead of the PHP addslashes() function when you build queries - this will prepare your code for DBAL.
|