Technical Documentation

Show a record

 
Submit data …
ID 988
Category array
Required no
Element $zz['filter'][n]['where_if']
Description

'where_if' allows to set a WHERE query individually for each selection

Description de
Example
$zz['filter'][1]['identifier'] = 'validity';
$zz['filter'][1]['type'] = 'list';
$zz['filter'][1]['where_if'][1] = 'ISNULL(activation_date)';
$zz['filter'][1]['where_if'][2] = sprintf(
    'activation_date >= DATE_SUB(NOW(), INTERVAL %d hour)'
    , wrap_get_setting('access_codes_validity_in_hours')
);
$zz['filter'][1]['where_if'][3] = sprintf(
    'activation_date < DATE_SUB(NOW(), INTERVAL %d hour)'
    , wrap_get_setting('access_codes_validity_in_hours')
);
$zz['filter'][1]['selection'][1] = 'unused';
$zz['filter'][1]['selection'][2] = 'active';
$zz['filter'][1]['selection'][3] = 'expired';
Default value
Mother ID $zz['filter'][n] | [332]
Relation
Updated 22 Jun 2017 11:47:28
IDCategoryReq.Element Action
988arrayno$zz['filter'][n]['where_if'] 'where_if' allows to set a WHERE query individually for each selectionShow
336string: SQLno$zz['filter'][n]['where'] If type == 'list', this is the required part for the WHERE condition without the equal sign. Might be, even without 'selection', an array for multiple WHERE-conditions connected with OR filter=NULL and filter=!NULL will be translated to the correct SQL query formShow
265array: pathno$zz['folder'][] array with root, string, field, mode for a folder that must be renamed/deleted after changing the record

Relations: ACTION

Show
933string: HTMLno$zz['geo_map_html'] if set, zzbrick/forms module will include a javascript map (e. g. OpenLayers) to display the records via a KML export on this map; a map template and a JavaScript-library is required

Relations: $zz_conf['export']; brick_forms()

Show
934stringno$zz['geo_map_template'] template for $zz['geo_map_html']

Relations: $zz_conf['export']; brick_forms(); $zz['geo_map_html']

Show
974booleanno$zz['list']['hide_columns_if_empty'] check all columns in list and hide columns if they are empty, behaviour is equivalent to 'hide_in_list_if_empty' on a per field basis

Relations: LIST; $zz['fields'][n]['hide_in_list_if_empty']

Show
266arrayno$zz['list']['hierarchy'] display table in a hierarchical view. Caution: - these variables might need a lot of memory when handling bigger amounts of records because all record ids have to be saved to memory - in combination with a WHERE-Condition (`&where[field]=32`), some records might be missing in a branch of a tree because the WHERE-Condition might exclude these records. For the top level, the missing records will be shown read-only

Relations: GLOBAL

Show
268string: fieldno$zz['list']['hierarchy']['display_in'] field_name where hierarchy shall be displayed (level0...10), or table_name in case field is of type subtable

Relations: LIST

Show
945booleanno$zz['list']['hierarchy']['hide_top_value'] Shows hierarchy without top value, moving all records one level upShow
912integerno$zz['list']['hierarchy']['id'] ID of top record in hierarchy if just a subtree shall be displayed

Relations: LIST

Show
267string: fieldno$zz['list']['hierarchy']['mother_id_field_name'] field_name: mother ID, to get hierarchical view

Relations: LIST

Show
539booleanno$zz['list']['tfoot'] shows table foot, e. g. for sums of individual values

Relations: LIST

Show
920arrayno$zz['set_redirect'] List of redirects that will be added to the database redirects table if an identifier is updated or a record with an identifier is deleted. Might be list of strings (old and new pattern is equal), list of arrays (old and new patterns differ); field_name may be set optionally if more than one identifier is in the field list.

Relations: $zz['extra_action']; identifier

Show
8string: SQLyes$zz['sql'] SQL statement for list display and to get field values for form displayShow
9string: SQLno$zz['sqlorder'] SQL statement, part must begin with ' ORDER BY', to sort database tableShow
947string: SQLno$zz['sqlcount'] separate SQL query for counting records if main query is too heavy

Relations: $zz['sql']

Show
985string: SQLno$zz['sqlextra'] if SQL query is too complex, additional values can be read via 'sqlextra' queriesShow
941string: SQLno$zz['sqlrecord'] SQL query which will be used only for record view, not for list view

Relations: $zz['sql']

Show
7string: fieldyes$zz['table'] Name of database table (might include database name as well, e. g. Database.Table)Show
216string: HTMLno$zz['title'] optional: h1-heading to be used for form instead of $zz['table']

Relations: OUTPUT

Show

916 records total

in