Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test functions

update_collection_parent()

Description

Update collection parent for this collection

Parameters

ColumnTypeDefaultDescription
$cid int
$parent int
@cid integer The collection ID
@parent integer The featured collection ID that is the parent of this collection

Return

boolean

Location

include/collections_functions.php lines 5392 to 5403

Definition

 
function update_collection_parent(int $cidint $parent)
    {
    if(
$cid <= || $parent <= 0)
        {
        return 
false;
        }

    
collection_log($cidLOG_CODE_EDITED"""Update collection parent to '{$parent}'");
    
ps_query("UPDATE collection SET `parent` = ? WHERE ref = ?", ['i'$parent'i'$cid]);

    return 
true;
    }

This article was last updated 4th December 2024 09:05 Europe/London time based on the source file dated 27th November 2024 15:30 Europe/London time.