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

get_node_id()

Description

Return a node ID for a given string


integer = node ID of matching keyword.

Parameters

ColumnTypeDefaultDescription
$value string The node name to return
$resource_type_field integer The field to search

Return

false = not found

Location

include/node_functions.php lines 1660 to 1671

Definition

 
function get_node_id($value,$resource_type_field)
    {
    
$node=sql_query("select ref from node where resource_type_field='" escape_check($resource_type_field) . "' and name='" escape_check($value) . "'","schema");
    if (
count($node)>0)
        {
        return 
$node[0]["ref"];
        }
    else
        {
        return 
false;
        }
    }

This article was last updated 25th November 2020 07:05 Europe/London time based on the source file dated 13th November 2020 16:50 Europe/London time.