CRFApplicationModel.php
31 lines
| 896 B
| text/x-php
|
PhpLexer
|
r0 | <?php | ||
class CRFApplicationModel extends ModelBase{ | ||||
public $tableName = 'sis_crf_appl'; | ||||
public $id = array('key'=>'idapplication','value'=>''); | ||||
public function addItem($datos){ | ||||
$this->setFieldArray($datos); | ||||
list($resultado,$id,$mensaje) = $this->insert(); | ||||
return array ($resultado,$id,$mensaje); | ||||
} | ||||
public function DeleteItem(){ | ||||
list($resultado,$mensaje) = $this->delete(); | ||||
return array ($resultado,$mensaje); | ||||
} | ||||
public function UpdateItem($datos){ | ||||
$this->setFieldArray($datos); | ||||
list($resultado,$mensaje) = $this->update(); | ||||
return array ($resultado,$mensaje); | ||||
} | ||||
public function getCRF($id){ | ||||
$query = "SELECT * FROM ".$this->tableName | ||||
." WHERE idsubject = ".$id; | ||||
$result = $this->db->prepare($query); | ||||
$result->execute(); | ||||
return $result; | ||||
} | ||||
} | ||||
?> | ||||