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

jsp²åͼƬµ½MySQL - Web ¿ª·¢ / ÆäËû

¸ãÁËÒ»¸öÏÂÎçÁË£¬ËÑË÷ÁËÍøÂ绹Êǽâ¾ö²»ÁË...Ï£Íû¸ßÊÖ°ïæ½â¾öÏÂ
Ô´´úÂ룺
private void SendPhoto(HttpServletRequest request,
HttpServletResponse response) {
String name=request.getParameter("image"); //»ñȡͼƬ·¾¶£¬²âÊÔºóûÓÐÎÊÌâ
String filename=name.replace("\\", "\\\\");
File file=new File(filename);
InputStream str = null;
try {
str = new BufferedInputStream(new FileInputStream(file));
} catch (FileNotFoundException e1) {
e1.printStackTrace();

String sql= "insert into photos(image) values(null,now(),?)";//null¶ÔÓ¦µÄΪ×Ô¶¯Ôö¼ÓµÄid,imageµÄÀàÐÍΪblob
Connection conn=DB.getConn();//DBÊÇ·â×°µÄÁ´½ÓÊý¾Ý¿âµÄÀà
PreparedStatement pstmt=DB.prepareStmt(conn, sql);
try {
pstmt.setBinaryStream(1,str,str.available());  
result=pstmt.executeUpdate();
pstmt.close();
str.close();
} catch (SQLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();

}
´íÎóÈçÏ£ºcom.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?:?v·é-??±???ü??zq?5*?we,V·Zd?I?ùQ??ü] ???
z???#?o>?l6? (??Rz?*?o??§???Wu??¡


Ïà¹ØÎÊ´ð£º

jspÒ³ÃæÖÐ×ÖÌå±äÉ«ÎÊÌâ - Java / Web ¿ª·¢

<html><head><title>[@title]</title>
<meta http-equiv=Content-Type content="text/html; charset=gb2312">
<script language='javascript'>
function diyCheck ......

JSP/Servlet½»»¥ - Java / Web ¿ª·¢

JSPÒ³ÃæÖÐÓжà¸öradio°´Å¥
  JSPÒ³Ãæ½«²ÎÊýPOST¸øservlet
  
  ÒªÇóÈçÏÂ;
  1.Ñ¡ÔñÒ»¸öradio£¬µ÷ÓÃservlet servletÖиù¾Ý²ÎÊýµ÷ÓÃÆäËû½Ó¿Ú£¬³ý·ÇÑ¡ÖиÃradio²¢µã»÷JSPÖеÄʵР......

JSP·­Ò³ÎÊÌâ - Java / Java EE

JSPÖÐÒª´ÓÊý¾Ý¿âÀïÃæ¶ÁÈ¡Êý¾Ý ÿҳÏÔʾ5ÌõÊý¾Ý£¬Òª½øÐз­Ò³£¬»¹Òª·µ»ØÇ°Ò»Ò³ ¸ÃÔõôʵÏÖ°¡
ÓõÄʲôÊý¾Ý¿âÄØ£¿£¿£¿

MYSQL


....лл ÎÒÏÈ¿´¿´´úÂë

http://my.donews.com/benz/2006/10/21/YnmQXKsKWNgKiTJ ......

PHP+MYSQLÊý¾Ý¼¯´¦Àí - PHP / »ù´¡±à³Ì

1¡¢ÊDz»ÊÇPHPÖÐÖ»ÄÜʹÓÃmysql_query("update user_aa set money=money2-".$bpanmm." where uid=".$userppp);¸üÐÂÊý¾Ý£¿£¿£¿
2¡¢PHP¸üÐÂmysql_fetch_row($res)Óëmysql_fetch_array($res)ÖеÄÊý¾ ......

myeclipse+mysqlµÄÅäÖÃÎÊÌâ - Java / Eclipse

ÎÒÊǸöÐÂÊÖ£¬Íû¸ßÊÖ½â´ð
ÎÒÏÖÔÚÒѾ­°²×°ÁËmysql£¬Ò²ÓÐmysqlµÄjdbc¡£µ«ÎÒÔõôÅäÖú󣬲ÅÄÜÔÚMyEclipseÀï²Ù×÷mysqlÄØ£¿Çë¸ßÊÖ˵Ïêϸµã
´ò¿ªMyeclipse----window---open perspective---MyEclipse database explorer-- ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ