This is table that has all the skills which candidate can add to their profile in candidate table通過它一次刪除的值是該用逗號在一個MySQL表的列分隔位置
And this is where candidate has added desired skills which is separated by comma,
現在我堅持,問題是我怎麼能刪除那些我不技能想再想要在我的個人資料中。這是由逗號這就是分開的,爲什麼我發現它刪除individualy
$sql_r = "select expert_skills, inter_skills, beginner_skills
from user_personal_details
WHERE upd_user_id = '". $_SESSION["user_id"] ."'";
$skills_render = $this->model->execute_query_all($sql_r);
$arr1=explode(",",$skills_render['0']['expert_skills']);
$ty = array_keys($arr1);
$ty1 = array_values($arr1);
$location = $_POST['skill_location'];
echo $location;
$位置變量即技能ID,我是從前端拍攝,我怎麼能按位置
這就是爲什麼你應該正常化您的數據庫... – jeroen
嘗試將數據保存爲JSON數組[看到這裏](https://www.sitepoint.com/use-json-data-fields-mysql-databases/) –
似乎是一種自我傷害給我。現在你仍然知道爲什麼把索引存儲在單列中的逗號分隔列表中 – RiggsFolly