Collections functions
General functions
Node functions
Render functions
Theme permission functions
User 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 4988 to 5007

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,
        
's'$alt_type
        
]
    );
    return 
sql_insert_id();
    }

This article was last updated 19th March 2024 02:35 Europe/London time based on the source file dated 11th March 2024 14:25 Europe/London time.