function select_entries($table, $selectable_int_fields, $selectable_str_fields, $filterable_virtual_fields, $criteria, $order_by = NULL, $ascending = true) { $entries = select_with_request_string("id", $table, $selectable_int_fields, $selectable_str_fields, $criteria, $order_by, $ascending); return filter_entries($entries, $table, $filterable_virtual_fields, $criteria, $order_by, $ascending); }
function select_unknown_owners($card) { $known_players = array_of_ids(select_with_request_string("player AS id", "owned", array("game", "player", "card", "status"), array(), array("game" => game, "card" => $card))); return array_diff(array_of_ids(select_suspects()), $known_players); }
function select_players($criteria = array(), $order_by = NULL, $ascending = true) { set_if_not_set($criteria["game"], game); return select_with_request_string("player as id", "player", array("player", "cards", "game"), array(), $criteria, $order_by, $ascending); }