Esempio n. 1
0
 public static function get_all_position($connection)
 {
     $statement = $connection->prepare("SELECT * FROM position");
     $statement->execute();
     $result = $statement->get_result();
     $positions = array();
     while ($row = $result->fetch_assoc()) {
         $position = new Position();
         $position->set_name($row["position"]);
         array_push($positions, $position);
     }
     return $positions;
 }