Web?????????SQL???
???????????? ???????[ 2013/12/6 14:13:57 ] ????????
???????????????ó?????????????а??????????????????????Щ????????????????????????????????????????????????????С?????????????SQL???OS Shell??LDAP??Xpath??Hibernate??????????SQL??????????????????????????????????????????????????????????????????SQL?????????????????????????????????????
??????????sql?????????????????????????????????????????????????SQL????ɡ?
????SQL????????????д??????????????????????????????????????SQL????????????????????????д???????????????????????????????????????SQL??????????SQL??????????????????????????????????????????????
????????????java????????????Java????????????
<font face="????" color="#000000">String query =??SELECT account_balance FROM user_data WHERE user_name =??
+ request.getParameter(??customerName??);
try {
Statement statement =
connection.createStatement( …);
ResultSet results =
Statement.executeQuery(query);
}</font>
|
<font face="????" color="#000000">String custname = request.getParameter(??customerName??);
String query =??SELECT account_balance FROM user_data WHERE user_name= ???;
PreparedStatement pstmt = connection.prepareStatement(query);
Pstmt.setString1??custname();
ResultSet results = pstmt.executeQuery();</font>
|
?????????????????洢????
?????洢???????????????????????????????????洢???????????岢???????????У????????ó????????
????Java?洢?????????
String custname = request.getParameter(??customerName??);
try {
CallableStatement cs = connection.prepareCall(??call sp_getAccountBalance(?)}??);
cs.setString(1??custname);
Result results = cs.executeQuery();
}catch(SQLException se){
//error handling
}
|
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11