From c0f8237895cd8da5e120ae55e19991ea6eac8f27 Mon Sep 17 00:00:00 2001 From: stan Date: Mon, 19 Apr 2004 10:38:22 +0000 Subject: [PATCH] Fixed problem with viewing from a filter that had monitor name in. git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1008 e3e1d417-86f3-4887-817a-d78f3d33393f --- web/zm_html_view_event.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/zm_html_view_event.php b/web/zm_html_view_event.php index ce706b5e7..5eaf2d6de 100644 --- a/web/zm_html_view_event.php +++ b/web/zm_html_view_event.php @@ -49,7 +49,7 @@ $event = mysql_fetch_assoc( $result ); parseSort(); parseFilter(); -$sql = "select * from Events as E where $sort_column ".($sort_order=='asc'?'<=':'>=')." '".$event[$sort_field]."'$filter_sql$mid_sql order by $sort_column ".($sort_order=='asc'?'desc':'asc'); +$sql = "select E.* from Events as E inner join Monitors as M on E.MonitorId = M.Id where $sort_column ".($sort_order=='asc'?'<=':'>=')." '".$event[$sort_field]."'$filter_sql$mid_sql order by $sort_column ".($sort_order=='asc'?'desc':'asc'); $result = mysql_query( $sql ); if ( !$result ) die( mysql_error() ); @@ -62,7 +62,7 @@ while ( $row = mysql_fetch_assoc( $result ) ) } } -$sql = "select * from Events as E where $sort_column ".($sort_order=='asc'?'>=':'<=')." '".$event[$sort_field]."'$filter_sql$mid_sql order by $sort_column $sort_order"; +$sql = "select E.* from Events as E inner join Monitors as M on E.MonitorId = M.Id where $sort_column ".($sort_order=='asc'?'>=':'<=')." '".$event[$sort_field]."'$filter_sql$mid_sql order by $sort_column $sort_order"; $result = mysql_query( $sql ); if ( !$result ) die( mysql_error() );