| 1 |
<?php |
<?php |
| 2 |
// $Id: votingapi.module,v 1.46.2.23.2.2 2009/07/20 16:16:35 eaton Exp $ |
// $Id: votingapi.module,v 1.46.2.23.2.3 2009/07/20 22:24:45 eaton Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 514 |
* Retrieve the value of the first vote matching the criteria passed in. |
* Retrieve the value of the first vote matching the criteria passed in. |
| 515 |
*/ |
*/ |
| 516 |
function votingapi_select_single_vote_value($criteria = array()) { |
function votingapi_select_single_vote_value($criteria = array()) { |
| 517 |
if ($votes = votingapi_select_votes($criteria)) { |
foreach (votingapi_select_votes($criteria) as $vote) { |
| 518 |
return $votes[0]['value']; |
return $vote['value']; |
| 519 |
} |
} |
| 520 |
} |
} |
| 521 |
|
|
| 523 |
* Retrieve the value of the first result matching the criteria passed in. |
* Retrieve the value of the first result matching the criteria passed in. |
| 524 |
*/ |
*/ |
| 525 |
function votingapi_select_single_result_value($criteria = array()) { |
function votingapi_select_single_result_value($criteria = array()) { |
| 526 |
if ($results = votingapi_select_results($criteria)) { |
foreach (votingapi_select_results($criteria) as $result) { |
| 527 |
return $results[0]['value']; |
return $result['value']; |
| 528 |
} |
} |
| 529 |
} |
} |
| 530 |
|
|