sql_query

  • Type: String
  • Range / Valid values: Max 4095 characters
  • Default: insert into security(camera, filename, frame, file_type, time_stamp, text_event) values('%t', '%f', '%q', '%n', '%Y-%m-%d %T', '%C')
  • Option Topic

SQL query string that is sent to the database. The values for each field are given by using convertion specifiers

Most common conversion specifiers

  • %Y = year, %m = month, %d = date
  • %H = hour, %M = minute, %S = second
  • %v = event
  • %q = frame number
  • %t = thread (camera) number
  • %D = changed pixels
  • %N = noise level
  • %i and %J = width and height of motion area
  • %K and %L = X and Y coordinates of motion center
  • %C = value defined by text_event
  • %f = filename with full path
  • %n = number indicating filetype

Comments


for those hunting the wiki for a definition of filetype / file_type number to image type:

#define FTYPE_IMAGE            1
#define FTYPE_IMAGE_SNAPSHOT   2
#define FTYPE_IMAGE_MOTION     4
#define FTYPE_MPEG             8
#define FTYPE_MPEG_MOTION     16
#define FTYPE_MPEG_TIMELAPSE  32

-- IgoAtM - 30 Apr 2007

ConfigOptionForm edit

Option sql_query
Type String
Range Max 4095 characters
Default insert into security(camera, filename, frame, file_type, time_stamp, text_event) values('%t', '%f', '%q', '%n', '%Y-%m-%d %T', '%C')
Description SQL query string that is sent to the database. The values for each field are given by using convertion specifiers
Group Common Options For Database
Topic revision: r3 - 02 May 2007 - 00:22:16 - AngelCarpintero
 
Motion - Config Option Sql Query
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.