@Test
public void testFindBookById() throws SQLException {
Connection conn = JdbcUtils.getConn();
conn.setAutoCommit(false);
ConnectionProvider.newInstance().bind(conn);
//System.out.println("'%"+""+"%'");
System.out.println(new BookInfoVoDaoImpl().findBookInfoVoById(8,"%%","%%"));
conn.commit();
}
在Java中sql语句用占位符代替,传入参数的时候不需要单引号,因为本来就是字符串
i.bookcase = c.id where "
+ "i.id = ? and i.barcode like ? and i.bookname like ?"