Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

delete_nodes_for_resource_type_field()

Description

Delete all nodes for a resource type field

Parameters

ColumnTypeDefaultDescription
$ref
$resource_type_field integer ID of the resource type field

Return

void

Location

include/node_functions.php lines 156 to 168

Definition

 
function delete_nodes_for_resource_type_field($ref)
    {
    if(
is_null($ref) || '' === trim($ref) || === $ref)
        {
        
trigger_error('$ref must be an integer greater than 0');
        }

    
sql_query("DELETE FROM node WHERE resource_type_field = '" escape_check($ref) . "';");

    
clear_query_cache("schema");

    return;
    }

This article was last updated 13th July 2020 14:35 Europe/London time based on the source file dated 6th July 2020 18:09 Europe/London time.