Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

copy_hitcount_to_live()

Parameters

This function accepts no parameters.

Location

include/resource_functions.php lines 6771 to 6783

Definition

 
function copy_hitcount_to_live()
    {
    
# Copy the temporary hit count used for relevance matching to the live column so it's activated (see comment for
    # update_resource_keyword_hitcount())
    
sql_query("update resource_keyword set hit_count=new_hit_count");
    
    
# Also update the resource table
    # greatest() is used so the value is taken from the hit_count column in the event that new_hit_count is zero to support installations that did not previously have a new_hit_count column (i.e. upgrade compatability)
    
sql_query("update resource set hit_count=greatest(hit_count,new_hit_count)");
    
    
# Also now update resource_node_hitcount())
    
sql_query("update resource_node set hit_count=new_hit_count");
    }

This article was last updated 12th July 2020 08:35 Europe/London time based on the source file dated 10th July 2020 16:06 Europe/London time.