文章詳情頁
為什么更新創(chuàng)建不了
瀏覽:164日期:2022-06-05 10:37:36
問題描述
$result = Staff::update([
'name'=>'武松',
],['id'=>1045]);
if ($result){ return $result->name.'更新成功';
}else{
return $result->getError();
}
問題解答
回答1:可以貼一下完整的代碼嗎 或者可以參考一下 https://www.php.cn/php/php-update-method.html
相關(guān)文章:
1. 小白學(xué)python的問題 關(guān)于%d和%s的區(qū)別2. javascript - 使用vue做個(gè)抽獎(jiǎng)問題3. javascript - 請教移動端從詳情頁返回到列表頁原來位置的問題?4. javascript - vuex中子組件無法調(diào)用公共狀態(tài)5. javascript - webpack 打包 reactjs項(xiàng)目 css 分離6. javascript - (_a = [""], _a.raw = [""],....); js一個(gè)小括號的是什么意思?7. javascript - 關(guān)于微信掃一掃的技術(shù)問題8. javascript - js正則替換日期格式問題9. javascript - 關(guān)于js高級程序中的問題10. javascript - ES5的閉包用ES6怎么實(shí)現(xiàn)
排行榜

熱門標(biāo)簽