Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

get_resource_type_field()

Description

Returns field data from resource_type_field for the given field

Parameters

ColumnTypeDefaultDescription
$field integer Resource type field ID

Return

boolean|array

Location

include/resource_functions.php lines 3294 to 3307

Definition

 
function get_resource_type_field($field)
    {
    
$rtf_query="SELECT " columns_in("resource_type_field","rtf") . ", GROUP_CONCAT(rtfrt.resource_type) resource_types FROM resource_type_field rtf LEFT JOIN resource_type_field_resource_type rtfrt ON rtfrt.resource_type_field=rtf.ref WHERE rtf.ref = ? GROUP BY rtf.ref";
    
$return ps_query($rtf_query, array("i",$field), "schema");

    if(
== count($return))
        {
        return 
false;
        }
    else
        {
        return 
$return[0];
        }
    }

This article was last updated 14th July 2024 18:05 Europe/London time based on the source file dated 10th July 2024 11:30 Europe/London time.