Collections functions
General functions
Render functions
Theme permission functions
Resource functions

save_related_keywords()

Parameters

ColumnTypeDefaultDescription
$keyword
$related

Location

include/search_functions.php lines 2479 to 2495

Definition

 
function save_related_keywords($keyword,$related)
    {
    
debug_function_call("save_related_keywords"func_get_args());

    
$keyref resolve_keyword($keywordtruefalsefalse);
    
$s=trim_array(explode(",",$related));

    
ps_query("DELETE FROM keyword_related WHERE keyword = ?", array("i",$keyref));
    if (
trim($related)!="")
        {
        for (
$n=0;$n<count($s);$n++)
            {
            
ps_query("insert into keyword_related (keyword,related) values (?,?)",array("i",$keyref,"i",resolve_keyword($s[$n],true,false,false)));
            }
        }
    return 
true;
    }

This article was last updated 3rd October 2022 11:05 Europe/London time based on the source file dated 13th September 2022 17:55 Europe/London time.