Collections functions
General functions
Render functions
Theme permission 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 2674 to 2682

Definition

 
function get_filter_rule($ruleid)
    {    
    
$rule_data ps_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=? GROUP BY n.resource_type_field,frn.node_condition",array("i",$ruleid)); 
    if(
count($rule_data) > 0)
        {
        return 
$rule_data;
        }
    return 
false;
    }

This article was last updated 3rd October 2022 13:05 Europe/London time based on the source file dated 13th September 2022 17:55 Europe/London time.