试:
String sql = "SELECT * FROM note WHERE title LIKE '%'+?+'%' or AUTHOR LIKE '%'+?+'%' or CONTENT LIKE '%'+?+'%'";
PreparedStatement pstmt = null;
DataBaseConnection dbc = null;
dbc = new DataBaseConnection();
try
{
pstmt = dbc.getConnection().prepareStatement(sql) ;
pstmt.setString(1, cond);//这里已经按照网上大部分去做的,我晕了
pstmt.setString(2, cond);
pstmt.setString(3, cond);
// ...