Grass-valley K2 TX/MAM Database Protocol Manual v.2.2 Uživatelský manuál Strana 11

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 38
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 10
TX/MAM Database Protocol Manual - document version: 2.2 Page 11
6.4 Adding a criterion that defines a restriction for string database
fields
int cob_criteria_add_string( char *table, char *logical, char *criteria,
char *field , char *value );
Parameters
Name
Description
char *table
The table from which to use the field, e.g."asset_element".
char *logical
Which logical operator to use, e.g. LOP_AND.
char *criteria
The criteria type to use, e.g. COP_EQUALS.
char *field
The field to compare, e.g. "asset_string".
long long value
The value to compare e.g. "Clips".
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 a list of all asset_elements with an asset_string value that equals to "Clips"
and with status_int value that equals to 1:
cob_criteria_clear();
cob_criteria_add_integer( "asset_element", LOP_AND, COP_EQUALS, "status_int" , 1 );
cob_criteria_add_string( "asset_element", LOP_AND, COP_EQUALS, "asset_string" , "Clips" );
number_of_ids = cob_get_id_list( id_array, max_id_size );
Zobrazit stránku 10
1 2 ... 6 7 8 9 10 11 12 13 14 15 16 ... 37 38

Komentáře k této Příručce

Žádné komentáře