WJ2020-05-27 14:03:11
可以看看这个 public function add() { if ($this->request->isAjax()) { $data = [ 'icon' => $this->request->post('icon'), 'title' => $this->request->post('title'), 'orderby' => $this->request->post('orderby') ]; $this->service->addShopCate($data); $this->response(); } else { return $this->fetch(); } }
锅锅不黑2019-06-24 13:05:42
param() obtains the entire object, and there are many things in it that are not fields in your data table. You must first print out the data in $data and take a closer look at your code, such as saving the user name. The $data['username'] you submitted is not what you want. You have to find the parameters you need first and then save them.
殘留の回憶2019-06-16 21:44:59
I don’t understand what your problem is. Isn’t the code for inserting into the database already written in your program?