# Queries: {$count}{$totalTime ? sprintf(', time: %0.3f ms', $totalTime * 1000) : ''}, {$name}

Time ms | SQL Query | Rows
--- | --- | ---

{foreach $queries as [$connection, $sql, $params, $trace, $time, $rows, $error, $command, $explain]}

{if $error} ERROR {elseif $time !== null}{sprintf('%0.3f', $time * 1000)} {/if} {if $explain}
explain{/if} {if $trace}
trace{/if}

{Nette\Database\Helpers::dumpSql($sql, $params, $connection)|noescape} {if $explain}

{foreach $explain[0] as $col => $foo}
{/foreach}
{$col}
{foreach $explain as $row}
{foreach $row as $col}
{/foreach}
{$col}
{/foreach}

{/if} {if $trace} {substr_replace(Tracy\Helpers::editorLink($trace[0][file], $trace[0][line]), ' class="nette-DbConnectionPanel-source"', 2, 0)}

{foreach $trace as $row}
{isset($row[file]) ? Tracy\Helpers::editorLink($row[file], $row[line]) : ''} | {$row[class] ?? ''}{$row[type] ?? ''}{$row[function]}()
{/foreach}

{/if}

{$rows}

{/foreach}

{if count($queries) < $count}

...and more

{/if}