/** * @param int $id_node */ public function removeNodeDataChar($id_node, $key) { $q = $this->dbNodeDataChar->duplicate(); if (!is_array($id_node)) { $q->andWhere(['id_node' => $id_node, 'key_name' => $key]); } else { $q->andWhere($id_node); } return $q->remove(); }
/** * @param id $group */ public function existGroup($group) { if (!strlen("{$group}")) { return false; } if (!ctype_digit("{$group}")) { $gid = $this->idGroup($group); } else { $gid = $group; } if (!strlen("{$gid}")) { return false; } $q = $this->dbGroup->duplicate()->selectColumn('gid'); $q->andWhere($gid); if ($q->getAssoc()) { return true; } }