From 01bf61363c47ec1da7d02c9cd8efbb18989a178f Mon Sep 17 00:00:00 2001 From: stan Date: Tue, 22 Nov 2005 10:37:17 +0000 Subject: [PATCH] Tweaked SQL slightly. git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1612 e3e1d417-86f3-4887-817a-d78f3d33393f --- web/zm_html_view_frame.php | 2 +- web/zm_xhtml_view_frame.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/web/zm_html_view_frame.php b/web/zm_html_view_frame.php index 2c11b7f14..5afe5d47f 100644 --- a/web/zm_html_view_frame.php +++ b/web/zm_html_view_frame.php @@ -23,7 +23,7 @@ if ( !canView( 'Events' ) ) $view = "error"; return; } -$sql = "select E.*,M.Name as MonitorName,M.Width,M.Height,M.DefaultScale from Events as E inner join Monitors as M on E.MonitorId = M.Id where E.Id = '$eid' and E.MonitorId = M.Id"; +$sql = "select E.*,M.Name as MonitorName,M.Width,M.Height,M.DefaultScale from Events as E inner join Monitors as M on E.MonitorId = M.Id where E.Id = '$eid'"; $result = mysql_query( $sql ); if ( !$result ) die( mysql_error() ); diff --git a/web/zm_xhtml_view_frame.php b/web/zm_xhtml_view_frame.php index b81b05ac3..050d6259f 100644 --- a/web/zm_xhtml_view_frame.php +++ b/web/zm_xhtml_view_frame.php @@ -23,7 +23,8 @@ if ( !canView( 'Events' ) ) $view = "error"; return; } -$result = mysql_query( "select E.*,M.Name as MonitorName,M.Width,M.Height from Events as E, Monitors as M where E.Id = '$eid' and E.MonitorId = M.Id" ); +$sql = "select E.*,M.Name as MonitorName,M.Width,M.Height,M.DefaultScale from Events as E inner join Monitors as M on E.MonitorId = M.Id where E.Id = '$eid'"; +$result = mysql_query( $sql ); if ( !$result ) die( mysql_error() ); $event = mysql_fetch_assoc( $result );