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 20th May 2022 07:35 Europe/London time based on the source file dated 14th March 2022 14:25 Europe/London time.