Collections functions
General functions
Render functions
Theme permission functions
Resource functions

update_resource_field_column()

Description

Update the value of the fieldXX field on resource table

Parameters

ColumnTypeDefaultDescription
$resource integer - Resource ID
$field integer - Metadata field ID
$value string - Value

Return

boolean

Location

include/resource_functions.php lines 8768 to 8774

Definition

 
function update_resource_field_column(int $resource,int $fieldstring $value)
    {
    
$sql "UPDATE resource SET `field" $field "` = ? WHERE ref = ?";
    
$params = ["s",truncate_join_field_value($value),"i",$resource];
    
ps_query($sql,$params);
    return 
true;
    }

This article was last updated 26th September 2022 13:35 Europe/London time based on the source file dated 22nd September 2022 10:25 Europe/London time.