db->tblDState . '` ' . 'WHERE 1 ' . 'ORDER BY `name`'; $res = $this->db->queryAll($sql, 0, null, true); $this->isDBError($res); return $res; } function isUniqueAmount($values) { $values = (array) $values; $sql = 'SELECT `amount` ' . 'FROM `' . $this->tableNameDB . 'Amount` ' . 'WHERE `amount` IN(' . Qs_Db::quote($values) . ') '; if ($this->id){ $sql .= ' AND `id` != ' . $this->db->quote($this->id, 'integer'); } $res = $this->db->queryCol($sql); $this->isDBError($res); return empty($res) ? true : $res; } function _insertDependency() { foreach ($this->_data['amount'] as $amount) { $this->getTable('BattleDonationAmount')->insert(array('idBattleDonation' => $this->id, 'amount' => $amount)); } } }