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

is_parent_node()

Description

Checks whether a node is parent to other nodes or not

Parameters

ColumnTypeDefaultDescription
$ref integer Node ref

Return

boolean

Location

include/node_functions.php lines 339 to 355

Definition

 
function is_parent_node($ref)
    {
    if(
is_null($ref))
        {
        return 
false;
        }

    
$query "SELECT exists (SELECT ref from node WHERE parent = '" escape_check($ref) . "') AS value;";
    
$parent_exists sql_value($query0);

    if(
$parent_exists 0)
        {
        return 
true;
        }

    return 
false;
    }

This article was last updated 1st December 2020 08:35 Europe/London time based on the source file dated 30th November 2020 09:45 Europe/London time.