speedups to syslog page, caching of device_id

git-svn-id: http://www.observium.org/svn/observer/trunk@743 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-01-29 21:10:05 +00:00
parent 22f8cfe8e0
commit d02ade9ba6
6 changed files with 40 additions and 14 deletions

View File

@@ -72,8 +72,8 @@ echo("
<h3>Recent Syslog Messages</h3>
");
$sql = "SELECT *, DATE_FORMAT(datetime, '%D %b %T') AS date from syslog ORDER BY datetime DESC LIMIT 20";
$sql = "SELECT *, DATE_FORMAT(datetime, '%D %b %T') AS date from syslog AS S, devices AS D
WHERE S.device_id = D.device_id ORDER BY datetime DESC LIMIT 20";
$query = mysql_query($sql);
echo("<table cellspacing=0 cellpadding=2 width=100%>");
while($entry = mysql_fetch_array($query)) { include("includes/print-syslog.inc"); }