static function random($scope, $position = null, $type = null) { $where = "`Scope`=" . $scope; if (isset($position)) { $where .= " AND `Position`=" . $position; } if ($type) { $where .= " AND `Type`=" . $type; } $data = ReadWrite::random('LanguageItems', array('ID', 'Name', 'Position', 'Scope', 'Type'), array('ID', 'Text', 'Position', 'Scope', 'Type'), $where); return new LanguageItem($data['Text'], $data['Scope'], $data['Position'], $data['Type'], $data['ID']); }
static function random($scope) { $data = ReadWrite::random('Responses', array("ID", "Rating", "Scope"), array("ID", "Rating", "Scope"), "`Scope`=" . $scope); return new Response($data['Rating'], $data['Scope'], $data['ID']); }