38 lines
895 B
PHP
38 lines
895 B
PHP
![]() |
<?php
|
||
|
|
||
|
/*
|
||
|
* To change this license header, choose License Headers in Project Properties.
|
||
|
* To change this template file, choose Tools | Templates
|
||
|
* and open the template in the editor.
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* Description of country
|
||
|
*
|
||
|
* @author may
|
||
|
*/
|
||
|
|
||
|
class round extends _list {
|
||
|
protected $entity = 'ess_round';
|
||
|
|
||
|
|
||
|
public function listAll() {
|
||
|
|
||
|
// returns an array of all
|
||
|
|
||
|
try {
|
||
|
$stmt = $this->PDO->prepare("SELECT id, CONCAT(name, ' (', year, ')') as name FROM l_" .$this->entity ." ORDER BY year ASC");
|
||
|
$stmt->execute();
|
||
|
|
||
|
if ($r = $stmt->fetchAll(PDO::FETCH_ASSOC)) {
|
||
|
return $r;
|
||
|
}
|
||
|
}
|
||
|
catch (exception $ex) {
|
||
|
common::except ('Err: ' .$ex .' in ' .__DIR__ .'/' .__FILE__ .':' .__LINE__);
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|