Project

General

Profile

Bug #18221 » patch_explainselect_multitables.patch

Administrator Admin, 2008-02-15 19:42

View differences:

/typo3_svn/t3lib/class.t3lib_db.php (working copy)
$indices_output = array();
if ($explain_output[0]['rows']>1 || t3lib_div::inList('ALL',$explain_output[0]['type'])) {
$debug = true; // only enable output if it's really useful
$res = $this->sql_query('SHOW INDEX FROM '.$from_table, $this->link);
if (is_resource($res)) {
while ($tempRow = $this->sql_fetch_assoc($res)) {
$indices_output[] = $tempRow;
foreach (split(',',$from_table) as $oneTable) {
$res = $this->sql_query('SHOW INDEX FROM '.$oneTable, $this->link);
if (is_resource($res)) {
while ($tempRow = $this->sql_fetch_assoc($res)) {
$indices_output[] = $tempRow;
}
$this->sql_free_result($res);
}
$this->sql_free_result($res);
}
} else {
$debug = false;
(1-1/2)