Collections functions
General functions
Render functions
Theme permission functions
Resource functions

get_request()

Description

Retrieve a resource request record

Parameters

ColumnTypeDefaultDescription
$request integer The request record ID

Return

mixed False if not found, the resource record (associative array) if found

Location

include/request_functions.php lines 11 to 27

Definition

 
function get_request($request)
    {
    
$parameters=array("i",$request);
    
$result=ps_query("SELECT u.username,u.fullname,u.email,r.user,r.collection,r.created,r.request_mode,r.status,r.comments,r.expires,r.assigned_to,
                        r.reason,r.reasonapproved,u2.username assigned_to_username 
                FROM request r 
                LEFT OUTER JOIN user u ON r.user=u.ref 
                LEFT OUTER JOIN user u2 ON r.assigned_to=u2.ref WHERE r.ref=?"
$parameters);
    if (
count($result)==0)
        {
        return 
false;
        }
    else
        {
        return 
$result[0];
        }
    }

This article was last updated 3rd October 2022 11:35 Europe/London time based on the source file dated 29th September 2022 16:25 Europe/London time.