_tableName}` WHERE `name` = " . $this->db->quote($name) . " LIMIT 1"; $id = $this->db->fetchOne($sql); if (!$id) { $id = $this->insert(array('name' => $name, 'enabled' => 'n')); } return $id; } }