1: <?php
2: 3: 4:
5: class ClAnno
6: {
7: 8: 9: 10:
11: function __construct($bd=null)
12: {
13: if(empty($bd)){
14: require_once('../core/incluir.php');
15: $nivel_dir = 3;
16: $libs = new Incluir($nivel_dir);
17: $this->bd = $libs->incluir('db');
18: }
19: $this->bd = (!empty($bd)) ? $bd : $this->bd;
20: }
21:
22: 23: 24: 25: 26:
27: public function listar_anno($filtro=null)
28: {
29: $resultado = array();
30: $query = "select * from cl_anno ";
31: $stmt = $this->bd->ejecutar($query);
32: while ($anno = $this->bd->obtener_fila($stmt)) {
33: array_push($resultado, $anno);
34: }
35: return $resultado;
36: }
37: }
38: ?>