Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

addAnnotationNodes()

Description

Add relations between annotation and nodes

Parameters

ColumnTypeDefaultDescription
$annotation_ref integer
$nodes array

Return

boolean

Location

include/annotation_functions.php lines 466 to 483

Definition

 
function addAnnotationNodes($annotation_ref, array $nodes)
    {
    if(
=== count($nodes))
        {
        return 
false;
        }

    
$query_insert_values '';
    foreach(
$nodes as $node)
        {
        
$query_insert_values .= ',(' escape_check($annotation_ref) . ', ' escape_check($node['ref']) . ')';
        }
    
$query_insert_values substr($query_insert_values1);

    
sql_query("INSERT INTO annotation_node (annotation, node) VALUES  {$query_insert_values}");

    return 
true;
    }

This article was last updated 17th May 2021 23:05 Europe/London time based on the source file dated 5th March 2021 16:05 Europe/London time.