// Execute delete SQL statement
@Override
public void deleteById(String id) {
// TODO Auto-generated method stub
int a=this.getCurrentSession().createSQLQuery("delete from players where id='"+id+"'").executeUpdate();
System.out.println(a+id);
}
Copy the code
// Execute the query SQL statement: return a single value
@Override
public String getSingle(String sql) {
// TODO Auto-generated method stub
System.out.println("getSTINGNNNNNNNNNNNNNNNNNNNNNNNNNN");
String back=this.getCurrentSession().createSQLQuery(sql).uniqueResult().toString();
System.out.println(back);
return back;
}
Copy the code