private function insertCustomSkill($project_id, $skill_name) { // Create an object for skill $objSkill = new skill(); // First check if it a duplicate skill, if yes, add that skill in the project table $skill_id = $objSkill->getSkillId($skill_name); if ($skill_id <= 0) { // It is a new skill and not fond in DB, so insert it $skill_id = $objSkill->insertSkill($skill_name); } else { // If skill_id>0, use it to insert below... // No need to do anything, this block is just for info } $result = $this->insertProjectSkill($project_id, $skill_id); return $result; }