Collections functions
General functions
Render functions
Theme permission functions
Resource functions

add_alternative_file()

Description

Add alternative file

Parameters

ColumnTypeDefaultDescription
$resource integer
$name string
$description string ""
$file_name string ""
$file_extension string ""
$file_size integer 0
$alt_type string ''

Return

integer

Location

include/resource_functions.php lines 4558 to 4577

Definition

 
function add_alternative_file($resource,$name,$description="",$file_name="",$file_extension="",$file_size=0,$alt_type='')
    {
    
debug_function_call("add_alternative_file"func_get_args());

    
$name trim_filename($name);
    
$file_name trim_filename($file_name);

    
ps_query("INSERT INTO resource_alt_files(resource,name,creation_date,description,file_name,file_extension,file_size,alt_type) VALUES (?, ?,now(), ?, ?, ?, ?, ?)",
        [
        
'i'$resource,
        
's'$name,
        
's'$description,
        
's'$file_name,
        
's'$file_extension,
        
'i'$file_size,
        
'i'$alt_type
        
]
    );
    return 
sql_insert_id();
    }

This article was last updated 5th October 2022 04:05 Europe/London time based on the source file dated 30th September 2022 14:20 Europe/London time.