tableNameDB} WHERE name = ".$this->db->quote($name); return $this->db->queryOne($sql) ; } function isNameUnique($name) { $sql = "SELECT COUNT(*) FROM {$this->tableNameDB} WHERE name = ".$this->db->quote($name); if ($this->id){ $sql .= ' AND id != '.$this->db->quote($this->id, 'integer'); } return !(bool)$this->db->queryOne($sql) ; } } ?>