JdbcFactory jdbc = new JdbcFactory();
String sqld = "select id from hnebony_user where username REGEXP '"
+ usernamebefor + "[1-9][0-9]+' and telephone='' LIMIT 0,1 for update";
Connection conn = jdbc.conn;
try {
conn.setAutoCommit(false);
Statement stat = conn.createStatement();
ResultSet re = stat.executeQuery(sqld);
int id = 0;
while(re.next()){
id = re.getInt(1);
System.out.println(id);
}
String sql = "update hnebony_user set telephone='" + phone
+ "',active_time='" + date + "',callingID='" + mac
+ "',addr
String sqld = "select id from hnebony_user where username REGEXP '"
+ usernamebefor + "[1-9][0-9]+' and telephone='' LIMIT 0,1 for update";
Connection conn = jdbc.conn;
try {
conn.setAutoCommit(false);
Statement stat = conn.createStatement();
ResultSet re = stat.executeQuery(sqld);
int id = 0;
while(re.next()){
id = re.getInt(1);
System.out.println(id);
}
String sql = "update hnebony_user set telephone='" + phone
+ "',active_time='" + date + "',callingID='" + mac
+ "',addr