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

get_collection_log()

Description

Return the log for $collection

Parameters

ColumnTypeDefaultDescription
$collection integer
$fetchrows integer -1 How many rows to fetch

Return

array

Location

include/collections_functions.php lines 2701 to 2728

Definition

 
function get_collection_log($collection$fetchrows = -1)
    {
    
debug_function_call("get_collection_log"func_get_args());

    global 
$view_title_field;

    
$extra_fields hook("collection_log_extra_fields");
    if(!
$extra_fields)
        {
        
$extra_fields "";
        }

    return 
sql_query("
                 SELECT c.ref,
                        c.date,
                        u.username,
                        u.fullname,
                        c.type,
                        r.field
{$view_title_field} AS title,
                        c.resource,
                        c.notes
                        
{$extra_fields}
                   FROM collection_log AS c
        LEFT OUTER JOIN user AS u ON u.ref = c.user
        LEFT OUTER JOIN resource AS r ON r.ref = c.resource
                  WHERE collection = '
{$collection}'
               ORDER BY c.ref DESC"
false$fetchrows);
    }

This article was last updated 23rd November 2020 19:35 Europe/London time based on the source file dated 23rd November 2020 16:00 Europe/London time.