however in the log file there is this:
I tracked it down to this file: ajax/status.php[Sat Aug 29 17:10:50 2009] [error] [client 192.168.202.230] SQL-ERROR(B186C4): select Events.Id as Id, MonitorId, Name, Cause, StartTime, date_format( StartTime, '%y/%m/%d %H:%i:%S' ) as StartTimeShort, EndTime, Width, Height, Length, Frames, AlarmFrames, TotScore, AvgScore, MaxScore, Archived, Videoed, Uploaded, Emailed, Messaged, Executed, Notes, min(Frames.FrameId) as MinFrameId, max(Frames.FrameId) as MaxFrameId, min(Frames.Delta) as MinFrameDelta, max(Frames.Delta) as MaxFrameDelta from Events left join Frames on Events.Id = Frames.EventId where Events.Id = undefined group by Frames.EventId limit 1, referer: http://192.168.202.7/zm/index.php?view= ... c=1&page=1
[Sat Aug 29 17:10:50 2009] [error] [client 192.168.202.230] SQL-ERROR(B186C4): Unknown column 'undefined' in 'where clause', referer: http://192.168.202.7/zm/index.php?view= ... c=1&page=1
this code:
Code: Select all
if ( count($fieldSql) )
{
$sql = "select ".join( ", ", $fieldSql )." from ".$entitySpec['table'];
if ( $joinSql )
$sql .= " ".join( " ", array_unique( $joinSql ) );
if ( $entitySpec['selector'] )
{
$index = 0;
$where = array();
foreach( $entitySpec['selector'] as $selector )
{
if ( is_array( $selector ) )
$where[] = $selector['selector']." = ".dbEscape($_REQUEST['id'][$index]);
else
$where[] = $selector." = ".dbEscape($_REQUEST['id'][$index]);
$index++;
}
$sql .= " where ".join( " and ", $where );
error_log("MAR:TEST R-ID(".$_REQUEST['id'].") R-eID(".$_REQUEST['eid'].") SQL(".$sql.") G-ID(".$_GET['id'].") G-eID(".$_GET['eid'].")");
}
As you can see I put in some debug (error-log) call and this is what it spits out:
Another interesting fact is that when this page loads, it calls this function twice. the 2nd time does not have an error, and has this as the debug data from the line i inserted:[Sat Aug 29 17:29:33 2009] [error] [client 192.168.202.230] MAR:TEST R-ID(Array) R-eID() SQL(select Events.Id as Id, MonitorId, Name, Cause, StartTime, date_format( StartTime, '%y/%m/%d %H:%i:%S' ) as StartTimeShort, EndTime, Width, Height, Length, Frames, AlarmFrames, TotScore, AvgScore, MaxScore, Archived, Videoed, Uploaded, Emailed, Messaged, Executed, Notes, min(Frames.FrameId) as MinFrameId, max(Frames.FrameId) as MaxFrameId, min(Frames.Delta) as MinFrameDelta, max(Frames.Delta) as MaxFrameDelta from Events left join Frames on Events.Id = Frames.EventId where Events.Id = undefined) G-ID() G-eID(), referer: http://192.168.202.7/zm/index.php?view= ... c=1&page=1
Is this a sign of a problem?[Sat Aug 29 17:29:33 2009] [error] [client 192.168.202.230] MAR:TEST R-ID(Array) R-eID() SQL(select Events.Id as Id, MonitorId, Name, Cause, StartTime, date_format( StartTime, '%y/%m/%d %H:%i:%S' ) as StartTimeShort, EndTime, Width, Height, Length, Frames, AlarmFrames, TotScore, AvgScore, MaxScore, Archived, Videoed, Uploaded, Emailed, Messaged, Executed, Notes, min(Frames.FrameId) as MinFrameId, max(Frames.FrameId) as MaxFrameId, min(Frames.Delta) as MinFrameDelta, max(Frames.Delta) as MaxFrameDelta from Events left join Frames on Events.Id = Frames.EventId where Events.Id = 2169) G-ID() G-eID(), referer: http://192.168.202.7/zm/index.php?view= ... c=1&page=1