摘要:
//得到总记录数 public int getTotalrecord(){ Connection conn = null; PreparedStatement st = null; ResultSet rs = null; try{ conn = JdbcUtils.getConnection(); String sql = "select count(*) from customer"; st = conn.prepareStatement(sql); ... 阅读全文
posted @ 2013-07-07 11:08
亂舞春秋
阅读(271)
评论(0)
推荐(0)
摘要:
//获取分页数据 public List getPageData(int startindex,int pagesize){ Connection conn = null; PreparedStatement st = null; ResultSet rs = null; try{ conn = JdbcUtils.getConnection(); String sql = "select * from customer limit ?,?"; st = conn.p... 阅读全文
posted @ 2013-07-07 11:06
亂舞春秋
阅读(293)
评论(0)
推荐(0)
摘要:
public Customer find(String id){ Connection conn = null; PreparedStatement st = null; ResultSet rs = null; try{ conn = JdbcUtils.getConnection(); String sql = "select * from customer where id=?"; st = conn.prepareStatement(sql); ... 阅读全文
posted @ 2013-07-07 11:05
亂舞春秋
阅读(211)
评论(0)
推荐(0)
摘要:
public void delete(String id){ Connection conn = null; PreparedStatement st = null; ResultSet rs = null; try{ conn = JdbcUtils.getConnection(); String sql = "delete from customer where id=?"; st = conn.prepareStatement(sql); st.... 阅读全文
posted @ 2013-07-07 11:04
亂舞春秋
阅读(238)
评论(0)
推荐(0)
摘要:
public void update(Customer c){ Connection conn = null; PreparedStatement st = null; ResultSet rs = null; try{ conn = JdbcUtils.getConnection(); String sql = "update customer set name=?,gender=?,birthday=?,cellphone=?,email=?,preference=?,type=?,desc... 阅读全文
posted @ 2013-07-07 11:03
亂舞春秋
阅读(249)
评论(0)
推荐(0)
浙公网安备 33010602011771号