Collections functions
General functions
Render functions
Theme permission functions
Resource functions

delete_resource_nodes_multi()

Description

Delete all node relationships matching the passed resource IDs and node IDs.

Parameters

ColumnTypeDefaultDescription
$resources array array An array of resource IDs
$nodes mixed array An integer or array of single/multiple nodes

Return

void

Location

include/node_functions.php lines 1487 to 1495

Definition

 
function delete_resource_nodes_multi($resources=array(),$nodes=array())
    {
    if(!
is_array($nodes))
        {
$nodes=array($nodes);}
        
    
$sql "DELETE FROM resource_node WHERE resource in (" ps_param_insert(count($resources)) . ") AND node in (" ps_param_insert(count($nodes)) . ")";
    
$params array_merge(ps_param_fill($resources"i"), ps_param_fill($nodes"i"));
    
ps_query($sql$params);
    }

This article was last updated 20th May 2022 09:05 Europe/London time based on the source file dated 6th April 2022 16:35 Europe/London time.