Collections functions
General functions
Render functions
Theme permission functions
Resource functions

get_node()

Description

Get a specific node by ref

this parameter which is passed by reference

Parameters

ColumnTypeDefaultDescription
$ref integer ID of the node
&$returned_node array
$returned_node array If a value does exist it will be returned through

Return

boolean

Location

include/node_functions.php lines 227 to 248

Definition

 
function get_node($ref, array &$returned_node)
    {
    if(
is_null($ref) || (trim($ref)=="") || >= $ref)
        {
        return 
false;
        }

    
$parameters= [];
    
$sql columns_in("node");
    
add_sql_node_language($sql,$parameters);    
    
$parameters[] = "i";$parameters[] = $ref;
    
$node  ps_query("SELECT " $sql " FROM node WHERE ref = ?",$parameters,"schema");

    if(
count($node)==0)
        {
        return 
false;
        }

    
$returned_node $node[0];

    return 
true;
    }

This article was last updated 29th January 2023 09:05 Europe/London time based on the source file dated 25th January 2023 18:05 Europe/London time.