Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

get_filter_rule()

Description

Get filter rule

Parameters

ColumnTypeDefaultDescription
$ruleid int - ID of filter rule

Return

array

Location

include/search_functions.php lines 2553 to 2561

Definition

 
function get_filter_rule($ruleid)
    {    
    
$rule_data sql_query("SELECT fr.ref, frn.node_condition, group_concat(frn.node) AS nodes, n.resource_type_field FROM filter_rule fr JOIN filter_rule_node frn ON frn.filter_rule=fr.ref join node n on frn.node=n.ref WHERE fr.ref='" escape_check($ruleid) . "' GROUP BY n.resource_type_field,frn.node_condition"); 
    if(
count($rule_data) > 0)
        {
        return 
$rule_data;
        }
    return 
false;
    }

This article was last updated 25th February 2021 08:05 Europe/London time based on the source file dated 18th February 2021 17:00 Europe/London time.