Originally to do the purpose of data mining in which network, the structure has become a system development ...
But still more serious to do for three months, the teacher is very agree with my work attitude and results ...
The internship is coming to an end, summarizing a few things that have not been noticed before to become habits and problems, to share to everyone.
At the same time to play an advertisement: to which network Internal audit department recruit Javaweb Development intern, Time is very free, a week, Saturday Sunday even can, the time of the small partners to give me a message ah, earn a pocket money, but also a long experience .... (GPA, want to work a senior dog is the most suitable ... )
Compare two pieces of code logic:
<span style= "White-space:pre" ></span><strong>while (Rs.next ()) {</strong>string processID_ Temp = rs.getstring ("ProcessID"); sql = "SELECT COUNT (*) as usefrequence from col_summary WHERE form_appid = '" +processid_t Emp+ "'"; ResultSet rs_usefrequence = dbconn.getselectresultset (sql, Conn_oa); while (Rs_usefrequence.next ()) {usefrequence + = rs _usefrequence.getstring ("usefrequence") + ";";}}
After modification:
<span style= "white-space:pre" ></span>sql = "Select Form_appid, COUNT (*) as usefrequence from Col_summary"; ResultSet rs_usefrequence = dbconn.getselectresultset (sql, Conn_oa), while (Rs_usefrequence.next ()) { Mapusefrequence.put (rs_usefrequence.getstring ("Form_appid"), Rs_usefrequence.getstring ("useFrequence")); <strong>while (Rs.next ()) {</strong>string processid_temp = rs.getstring ("ProcessID"); if ( Mapusefrequence.containskey (processid_temp)) {usefrequence + = Mapusefrequence.get (processid_temp) + ";";} else{ Usefrequence + = "0" + ";";}}
Do not read the message ...
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Where to go net internship Summary: How to effectively reduce access to the database (Javaweb)