想在MyEclipse中实现如下语句:select * from goods where goodsName like %?% limit ?,?
在A处应该怎样写呢? ps = conn.preparestatement(" A");
ps.setString(1,goodsName)
问题很简单,不过我还是很重要,有劳各位了
想在MyEclipse中实现如下语句:select * from goods where goodsName like %?% limit ?,?
在A处应该怎样写呢? ps = conn.preparestatement(" A");
ps.setString(1,goodsName)
问题很简单,不过我还是很重要,有劳各位了
[code="java"]
ps = conn.preparestatement("select * from goods where goodsName like ? limit ?,? ");
ps.setString(1,"%" + goodsName + "%")
[/code]