Page 1 of 1

Monitor Presets

Posted: Mon May 01, 2006 9:53 pm
by voronwe
Hi all

I have installed the 1.22.1 and wow tis looks great, and i like all the new things that i have found so far, and have found one error.

Senario :

Add New Monitor

go for the presets, and choose any of the Axis presets, and i get the following error.

Code: Select all

Unknown column 'AlarmMaxFPS' in 'field list'
Witch result in the preset dont work.
And no errors in any of the logfiles from what i can see.

Posted: Tue May 02, 2006 9:56 am
by zoneminder
Thanks for this. I have reproduced the issue here and it looks like I was overdiligent in adding the AlarmMaxFPS to db queries and added it to one for a table that didn't have the column.

This patch should address the issue until I get a fix out properly.

Code: Select all

*** zm_html_view_monitor.php    12 Apr 2006 13:27:24 -0000      1.51
--- zm_html_view_monitor.php    2 May 2006 09:54:17 -0000
***************
*** 112,118 ****
  }
  if ( !empty($preset) )
  {
!       $result = mysql_query( "select Type, Device, Channel, Format, Host, Port, Path, Width, Height, Palette, MaxFPS, AlarmMaxFPS, Controllable, ControlId, ControlDevice, ControlAddress, DefaultRate, DefaultScale from MonitorPresets where Id = '$preset'" );
        if ( !$result )
                die( mysql_error() );
        $preset = mysql_fetch_assoc( $result );
--- 112,118 ----
  }
  if ( !empty($preset) )
  {
!       $result = mysql_query( "select Type, Device, Channel, Format, Host, Port, Path, Width, Height, Palette, MaxFPS, Controllable, ControlId, ControlDevice, ControlAddress, DefaultRate, DefaultScale from MonitorPresets where Id = '$preset'" );
        if ( !$result )
                die( mysql_error() );
        $preset = mysql_fetch_assoc( $result );