LimeSurvey API - Master branch

SurveyDao
in package

Table of Contents

Methods

loadSurveyById()  : SurveyObj
Loads a survey from the database that has the given ID. If no matching survey is found then null is returned. Note that no results are loaded from this function call, only survey structure/definition.
loadSurveyResults()  : CDbCommand
Loads results for the survey into the $survey->responses array. The results begin from $minRecord and end with $maxRecord. Either none, or both, the $minRecord and $maxRecord variables must be provided.

Methods

loadSurveyById()

Loads a survey from the database that has the given ID. If no matching survey is found then null is returned. Note that no results are loaded from this function call, only survey structure/definition.

public loadSurveyById(int $id[, mixed $lang = null ][, FormattingOptions $oOptions = null ]) : SurveyObj

In the future it would be nice to load all languages from the db at once and have the infrastructure be able to return responses based on language codes.

Parameters
$id : int
$lang : mixed = null
$oOptions : FormattingOptions = null
Return values
SurveyObj

loadSurveyResults()

Loads results for the survey into the $survey->responses array. The results begin from $minRecord and end with $maxRecord. Either none, or both, the $minRecord and $maxRecord variables must be provided.

public loadSurveyResults(SurveyObj $survey, int $iMinimum, int $iMaximum[, string $sFilter = '' ][, string $completionState = 'all' ][, array<string|int, mixed> $aFields = array() ][, string $sResponsesId = null ]) : CDbCommand

If none are then all responses are loaded.

Parameters
$survey : SurveyObj
$iMinimum : int
$iMaximum : int
$sFilter : string = ''

An optional filter for the results, i string or arry of string

$completionState : string = 'all'

all, complete or incomplete

$aFields : array<string|int, mixed> = array()

If empty all, otherwise only select the selected fields from the survey response table

$sResponsesId : string = null
Return values
CDbCommand

        
On this page

Search results