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 3231 to 3244

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 = ?";
    
$return ps_query($rtf_query, array("i",$field), "schema");

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

This article was last updated 19th March 2024 10:05 Europe/London time based on the source file dated 11th March 2024 14:25 Europe/London time.