22 lines
483 B
PHP
22 lines
483 B
PHP
|
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @package HAM
|
||
|
* @subpackage Trigger
|
||
|
* @category Models
|
||
|
* @author Deon George
|
||
|
* @copyright (c) 2010 Deon George
|
||
|
* @license http://dev.leenooks.net/license.html
|
||
|
*/
|
||
|
class Model_Trigger extends ORM {
|
||
|
protected $_has_one = array(
|
||
|
'contact'=>array('foreign_key'=>'id'),
|
||
|
);
|
||
|
|
||
|
public function trigger($code) {
|
||
|
return $this->where('alarm','=',$code)->or_where('alarm','=',null)->find();
|
||
|
}
|
||
|
}
|
||
|
?>
|