Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test functions

get_research_request()

Description

Retrieves a research request by its reference number, returning its details including name, description, deadline, contact information, user assignment, status, and custom fields.

Parameters

ColumnTypeDefaultDescription
$ref int The reference number of the research request to retrieve.

Return

array|false An associative array with the research request details if found, or false if no request exists.

Location

include/research_functions.php lines 138 to 152

Definition

 
function get_research_request($ref)
    {
    
$rr_sql="SELECT rr.ref,rr.name,rr.description,rr.deadline,rr.email,rr.contact,rr.finaluse,rr.resource_types,rr.noresources,rr.shape,
                    rr.created,rr.user,rr.assigned_to,rr.status,rr.collection,rr.custom_fields_json,
                    (select u.username from user u where u.ref=rr.user) username, 
                    (select u.username from user u where u.ref=rr.assigned_to) assigned_username from research_request rr where rr.ref=?"
;
    
$rr_parameters=array("i",$ref);

    
$return=ps_query($rr_sql$rr_parameters);
    if (
count($return) == 0)
        {
        return 
false;
        }
    return 
$return[0];
    }

This article was last updated 17th November 2024 15:05 Europe/London time based on the source file dated 8th November 2024 12:05 Europe/London time.