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')
- Group: Database
SQL query string that is sent to the database. The values for each field are given by using
convertion specifiers, 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
Sample Query
insert into security(camera, filename, frame, file_type, time_stamp, text_event) values('%t', '%f', '%q', '%n', '%Y-%m-%d %T', '%C') insert or ignore into images (camera_nbr, file_name, year, month, day, hour, minute) values (8, '%f', '%Y','%m','%d','%H','%M')
The filetype is defined as bits in a binary number
Normal picture |
1 |
Snapshot picture |
2 |
Debug picture |
4 |
Movie file |
8 |
Debug Movie File |
16 |
Timelapse |
32 |