1 <?php // vim: set binary noeol et sts=4 sw=4 :
4 require_once 'DB/DataObject.php';
6 class T_DBO_Inscripto extends DB_DataObject
8 var $_database = 'taller';
9 var $__table = 'inscripto';
17 function staticGet($k, $v = NULL)
19 return DB_DataObject::staticGet('T_DBO_Inscripto', $k, $v);
22 // now define your table structure.
23 // key is column name, value is type
27 'id' => DB_DATAOBJECT_INT,
28 'padron' => DB_DATAOBJECT_INT,
29 'curso_id' => DB_DATAOBJECT_INT,
30 'mail' => DB_DATAOBJECT_STR,
31 'activo' => DB_DATAOBJECT_INT + DB_DATAOBJECT_BOOL,
35 // now define the keys.
41 function getFrom($padron, $activo = true)
43 $this->padron = $padron;
44 if (!is_null($activo)) $this->activo = $activo ? 1 : 0;
45 return $this->find(true);