10 defined(
'JPATH_PLATFORM') or die;
31 parent::__construct(
'#__updates',
'update_id', $db);
42 public function check()
45 if (trim($this->name) ==
'' || trim($this->element) ==
'')
47 $this->setError(
JText::_(
'JLIB_DATABASE_ERROR_MUSTCONTAIN_A_TITLE_EXTENSION'));
66 public function bind($array, $ignore =
'')
68 if (isset($array[
'params']) && is_array($array[
'params']))
72 $array[
'params'] = (string) $registry;
75 if (isset($array[
'control']) && is_array($array[
'control']))
79 $array[
'control'] = (string) $registry;
82 return parent::bind($array, $ignore);
94 public function find($options = array())
98 foreach ($options as $col => $val)
100 $where[] = $col .
' = ' . $this->_db->quote($val);
103 $query = $this->_db->getQuery(
true)
104 ->select($this->_db->quoteName($this->_tbl_key))
105 ->from($this->_db->quoteName($this->_tbl))
106 ->where(implode(
' AND ', $where));
107 $this->_db->setQuery($query);
109 return $this->_db->loadResult();