Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

message_remove_related()

Parameters

ColumnTypeDefaultDescription
$remote_activity 0
$remote_refs array

Location

include/message_functions.php lines 340 to 350

Definition

 
function message_remove_related($remote_activity=0,$remote_refs=array())
    {
    if(
$remote_activity==|| $remote_refs==|| (is_array($remote_refs) && count($remote_refs)==0) ){return false;}
    if(!
is_array($remote_refs)){$remote_refs=array($remote_refs);}
    
$relatedmessages sql_array("select ref value from message where related_activity='$remote_activity' and related_ref in (" implode(',',$remote_refs) . ");","");
    if(
count($relatedmessages)>0)
        {            
        
sql_query("DELETE FROM message WHERE ref in (" implode(',',$relatedmessages) . ");");
        
sql_query("DELETE FROM user_message WHERE message in (" implode(',',$relatedmessages) . ");");
        }
    }

This article was last updated 12th July 2020 04:05 Europe/London time based on the source file dated 2nd July 2020 09:49 Europe/London time.