science-ation/committee/volunteers.inc.php
2025-02-12 02:22:50 +00:00

18 lines
354 B
PHP

<?php
require_once(__DIR__.'/../user.inc.php');
function volunteers_load_all($mysqli, $year)
{
$q = $mysqli->query("SELECT * FROM users WHERE
year='$year'
AND FIND_IN_SET('volunteer',`roles`)>0");
$volunteers = array();
while($j = $q->fetch_assoc()) {
$volunteers[] = user_load($mysqli, -1, -1, NULL, $j);
}
return $volunteers;
}
?>