function _answers_question_answers in Answers 7
Same name and namespace in other branches
- 6.2 answers.module \_answers_question_answers()
- 6 answers.module \_answers_question_answers()
- 7.2 answers.module \_answers_question_answers()
- 7.3 answers.module \_answers_question_answers()
1 call to _answers_question_answers()
File
- ./
answers.module, line 108
Code
function _answers_question_answers($question) {
$results = array();
$qid = is_object($question) ? $question->nid : $question;
// Use views as a query engine
$view = views_get_view('answers_to_a_question');
$view
->set_arguments(array(
$qid,
));
$view
->execute();
foreach ($view->result as $result) {
$nid = $result->nid;
$results[$nid] = $nid;
}
return $results;
}