Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Çë½ÌÒ»¸öjsp¼òµ¥µÄmysqlÎÊÌâ

ÊÇÒ»Ìõ¸üвÙ×÷£º
Java code:

¡­¡­
private Integer bonus = 0;
public Integer getBonus() {
return bonus;
}
public void setBonus(Integer bonus) {
this.bonus = bonus;
}


String SQL = "UPDATE users SET bonus = bonus" + this.getBonus()
+ " WHERE id='" + this.getID() + "'";
new DataBase().executeUpdate(SQL);



Ô­ÒâÊǰÑÊý¾Ý¿âÖÐÔ­ÓеÄbonusֵȡ³öºó¼ÓÉÏеÄthis.getBonus()ºóÔٷŻص½bonus×Ö¶ÎÖС£

¿ÉÊÇ·¢ÏÖÕâÌõsqlÓï¾äÖ´ÐÐÖ®ºóÊÇ´íÎóµÄ£º
SQL code:

SET bonus=bonus3 WHERE id='2' ¸½½üÓÐÎó



ÕæÔΣ¡£¬Ô­À´ÊÇbonusºÍthis.getBonus()ûÓнøÐмӷ¨ÔËË㣬¶øÊÇ×Ö·ûÁ¬½ÓÔËËãÁË£¡

Ôõô¸Ä£¿£¿£¿£¿£¿£¿£¿£¿£¿
¶¥Ï£¬Ã»¿´Ã÷°×¡£

Èç¹ûÄãµÄÊý¾Ý¿âÊÇMYSQLµÄ»°
String SQL = "UPDATE users SET bonus = concat(this.getBonus(),bonus)" +
                + " WHERE id='" + this.getID() + "'";
        new DataBase().executeUpdate(SQL);




Èç¹ûÉÏÃæµÄ²»ÐÐÄãÔÙÊÔÊÔÏÂÃæµÄ
String SQL = "UPDATE users SET bonus = bonus||¡±+this.getBonus
              &


Ïà¹ØÎÊ´ð£º

jspÖÐ <c:if test> Ïà¹ØÎÊÌâ

ÔÚ²éѯºó½«²éѯ³öÀ´µÄÖµ¸³¸ø¸÷ÊäÈë¿ò
<c:if test="${not empty dataValue}">
      fm.SAMPLING_DATE.value=" <c:out value='${dataValue.SAMPLING_DATE}'/ ......

Çómysql+php ÖÐÎÄÈ«ÎÄËÑË÷

×ö¸öÕ¾ÄÚËÑË÷£¬ÏÖÔÚÓÃlike ÕâÑùµÄЧÂÊʵÔÚÌ«µÍÁË£¬Ïë¸Ä³ÉÈ«ÎÄËÑË÷·½Ê½¡£

µ«¿´ÁËÍøÉÏ˵µÄÖÐÎÄÖ§³Ö²»ºÃ£¬ÏëÎÊһϸ÷λÐÖµÜÊÇÈçºÎ½â¾öÕâ¸öÎÊÌâµÄ£¿
µ¥¶À½¨Á¢Ö÷Ìâ±íºÍÄÚÈÝ±í ¼ìË÷Ö÷Ìâ

È»ºó¸ù¾ÝÖ÷Ìâ¼ìË÷Ä ......

JSPÖеÄÖÐÎÄ×Ö·û´¦Àí

<%@ page contentType = "text/html;charset =gb2312"%>

<%!
    public String codeToString(String str)
  {
    String s =str;
  &nbs ......

ÇóÖújspÖÐÔËÐÐJavabeanÎÊÌâ

SetGetPropertytest.jspÔ´´úÂëÈçÏ£¬Ð»Ð»´ó¼ÒǰÀ´°ï棬ͬʱף´ó¼ÒÖÐÇï¿ìÀÖ
<%@ page c%>
<HTML>
<HEAD>
<TITLE>setProperty¶¯×÷ÓëgetProperty¶¯×÷·¶Àý </TITLE> ......

jspÁ´½Ósql2000µÄÒÉÎÊ£¿



type Exception report


message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jas ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ