Initial commit

This commit is contained in:
Senad Uka
2018-06-11 11:09:35 +02:00
commit ed7df7b11f
1954 changed files with 483354 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?php
class CountriesModel{
/**
* get the list of all countries
* @return Array of countries
*/
public function getAllCountries($getArray = false){
global $database;
$sql = "SELECT
id,
name
FROM " . TABLES['countries']."
ORDER BY name";
$countriesArray = $database->fetchResultArray($sql);
if($getArray) {
return $countriesArray;
}
foreach($countriesArray as $countryInfo) {
$countries[$countryInfo['id']] = $countryInfo['name'];
}
return $countries;
}
}
?>