Collections functions
General functions
Render functions
Theme permission functions
Resource functions

copyRelatedResources()

Description

Copy related resources from one resource to another

Parameters

ColumnTypeDefaultDescription
$from integer Resource we are copying related resources from
$to
$ref integer Resource we are copying related resources to

Return

void

Location

include/resource_functions.php lines 6524 to 6527

Definition

 
function copyRelatedResources($from$to)
    {
    
ps_query("insert into resource_related(resource,related) SELECT ?,related FROM resource_related WHERE resource=? AND related <> ?",array("i",$to,"i",$from,"i",$to));
    }

This article was last updated 5th October 2022 12:05 Europe/London time based on the source file dated 30th September 2022 14:20 Europe/London time.