Grass Valley K2 TX/MAM Database Protocol Manual v.2.2 User Manual
Page 10

TX/MAM Database Protocol Manual - document version: 2.2
– Page 10
6.3 Adding a criterion that defines a restriction for int64 (='long long')
database fields
int cob_criteria_add_long( char *table, char *logical, char *criteria,
char *field, long long value );
Parameters
Name
Description
char *table
The table from which to use the field, e.g. "main_event".
char *logical
Which logical operator to use, e.g. LOP_AND.
char *criteria
The criterion type to use, e.g. COP_EQUALS.
char *field
The field to compare, e.g. "status".
long long value
The value to compare e.g. 2048.
Result
The result of the function is an integer that can have following values:
Value
Description
0
Success, the criterion has been added.
-1
Failure, the criterion could not be added.
Example
This example will retrieve all main events for id_Playlist = 1 and status = 2048:
cob_criteria_clear();
cob_criteria_add_long( "main_event", LOP_AND, COP_EQUALS, "id_Playlist" , 1 );
cob_criteria_add_integer( "main_event", LOP_AND, COP_EQUALS, "status" , 2048 );
number_of_ids = cob_get_id_list( id_array, max_id_size );