codeigniter - 如何使用codeiginter插入数据?
问题描述
我是codeiginter的新手,如何使用codeiginter将数据插入表中
我的控制器代码;
$data = array(
'subgrpname' => $this->input->post('subgrpname'),
'grpname'=> $this->input->post('grpname'),
'pltype'=> $this->input->post('pltype')
);
解决方案
这是简单的形式使用互联网搜索它
$data = array(
'subgrpname' => $this->input->post('subgrpname'),
'grpname'=> $this->input->post('grpname'),
'pltype'=> $this->input->post('pltype')
);
$this->db->insert('tablename',$data);
推荐阅读
- rust - Rust:错误,类型不匹配。找到 std::result::Result
- javascript - 不能在 NgModule 中声明模块,因为它不是当前编译 Angular 的一部分
- python - 为什么相同的代码在其他 Flask BluePrint 中会出现导入错误
- c# - C# 从不同的表单调用文本框
- rust - Rust:异步事务回调
- asp.net-core - 脚手架 MVC 在继承 IdentityDbContext 时不加载 ApplicationDbContext
- python - 机器学习 - 寻找最好的汽车转售
- r - R dplyr 收集从宽到长的多列多个值
- c# - 如何在没有 ASP.NET 身份的情况下对 web api ASP.NET Framework 进行谷歌身份验证?
- ios - iOS - 状态栏中的效果