Improve routines listing (thanks to paranoiq)

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1505 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana 2010-04-27 15:56:42 +00:00
parent 2b9041e242
commit f45cc0717d

View file

@ -96,11 +96,14 @@ if (support("routine")) {
echo "<h3>" . lang('Routines') . "</h3>\n";
$result = $connection->query("SELECT * FROM information_schema.ROUTINES WHERE ROUTINE_SCHEMA = " . $connection->quote(DB));
if ($result->num_rows) {
odd('');
echo "<table cellspacing='0'>\n";
echo '<thead><tr><th>' . lang('Name') . '<td>' . lang('Type') . '<td>' . lang('Return type') . "<td>&nbsp;</thead>\n";
while ($row = $result->fetch_assoc()) {
echo "<tr>";
echo "<td>" . h($row["ROUTINE_TYPE"]);
echo '<tr' . odd() . '>';
echo '<th><a href="' . h(ME) . ($row["ROUTINE_TYPE"] == "FUNCTION" ? 'callf=' : 'call=') . urlencode($row["ROUTINE_NAME"]) . '">' . h($row["ROUTINE_NAME"]) . '</a>';
echo '<td>' . h($row["ROUTINE_TYPE"]);
echo '<td>' . h($row["DTD_IDENTIFIER"]);
echo '<td><a href="' . h(ME) . ($row["ROUTINE_TYPE"] == "FUNCTION" ? 'function=' : 'procedure=') . urlencode($row["ROUTINE_NAME"]) . '">' . lang('Alter') . "</a>";
}
echo "</table>\n";