CRUD:增加(Create)、读取查询(Retrieve)、更新(Update)和删除(Delete)
来源:互联网 发布:如何判断域名被劫持 编辑:程序博客网 时间:2024/05/16 23:48
执行更新的操作时,根据前台传来的 id ,选中数据库里的数据信息,然后根据前台传来的type确定要执行的操作。
public String indexHomeCRUD(HttpServletRequest request, Integer t_id, String type) { Template temp = templateMapper.selectByPrimaryKey(t_id);/// 选中对应id的数据 request.setAttribute("temp",temp);/// 把取出的值 放入 temp if(type.equals("change")){ ///根据不同的tpye 跳转不同的页面 return "alterhome";///把并且把值带过去 }else if(type.equals("read")){ return "inspecthome"; /// }else if(type.equals("delete")){ return "deletehome"; }else{ return ""; }}
具体的增删改查还是对应页面的功能语句去处理,以上只是执行分类和赋值操作
阅读全文
0 0
- CRUD:增加(Create)、读取查询(Retrieve)、更新(Update)和删除(Delete)
- 关联关系的crud(增加(Create)、查询(Retrieve)(重新得到数据)、更新(Update)和删除(Delete))的理解(casecade和fetch)
- SQLite数据库的添加(Create),查询(Retrieve),更新(Updata),删除(Delete)
- MongoDB和Redis的CRUD (Create,Read,Update,Delete)
- SQL_4th_插入insert、查询select、删除delete、更新update
- 使用struts2框架来实现CRUD(create、read、update、delete)
- XML编程(CRUD)-create read update delete(DOM解析)
- oracle学习总结------ CRUD操作(create/retrleve/update/delete
- 第四章 第二节:更新和删除 UPDATE DELETE
- MySQL--操作简记(create创建操纵表、insert插入、update更新、delete删除数据)
- discuz 如何添加数据DB::insert和更新数据DB::update 查询DB::query删除DB::delete
- discuz 如何添加数据DB::insert和更新数据DB::update 查询DB::query删除DB::delete
- 2.php访问mysql数据库(Create Retrieve Update Delete:增删改查)
- 数据添加(insert),删除(delete),更新(update)
- Mybatis批量增加、批量更新、批量删除和查询
- Oracle与jdbc增删改查CRUD(Create-Read-Update-Delete)
- LINQ之使用Attach更新和删除(Update and Delete with Attach)
- 数据库级联更新 on update cascade和级联删除 on delete cascade
- spring事务和myBatis事务的设置
- Mybatis的搭建
- Jdata大数据竞赛总结
- linux内核 address_space 结构
- 操作系统复习-4.1 文件系统基础
- CRUD:增加(Create)、读取查询(Retrieve)、更新(Update)和删除(Delete)
- 1327: 表达式计算
- Android笔记(1)layout类似按钮的按下状态
- 关于SpringBoot部署上的一些坑
- 洗牌算法
- JS初级一基本理论
- CF Round422 Div2 PC(水题)
- unity学习日记:AssetBundle工作流程之资源的打包与加载
- php数组函数