MyEclipse下Web项目的开发,目前部分数据无法成功录入数据库,具体报错请看下面

OceanRoot 2017-06-23 10:40:08
挺急的,大二学生做课程设计,求各位大佬指导
这是update的代码 是修改界面
现在问题就是注册之后弹出修改界面,输入各项信息,数据库里只能录入会员名和密码
报错如下
com.mysql.jdbc.exceptions.jdbc4.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 'userID='10'' at line 1

其实userID=10就很奇怪,我已经把数据库里之前存的记录都删了,但是新的注册ID数字还是累计的是10 不是1

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>修改用户</title>
<SCRIPT language="javascript" type="text/javascript" src="/First/js/checkupdate.js"></SCRIPT>
<style type="text/css" media="screen">
.center{

margin:8%;
text-align:center;
}
#mainT{width:700px; text-align: center;font-size: 22px;line-height: 26px;border: 2px solid #6e6e6e;}
#mainT caption{text-align: center;font-size: 30px;font-weight: bolder;}
#mainT th{text-align: center;font-size: 20px;font-weight: bolder;line-height: 36px;border: 1px solid #6e6e6e;}
#mainT td{border: 1px solid #6e6e6e;font-size: 22px;}
</style>

</head>

<body>
<div class="center">
<h1>修改信息</h1>
<form action="/First/UserCl?type=Update&id=${updateUser.userID}" onsubmit="return validate_form(this)" method="post">
<table id="mainT" cellpadding="0" cellspacing="0">
<tr><th>会员名</th><td>${ updateUser.memberName }</td></tr>
<tr><th>密码</th><td><input type="password" style="width: 200px;height: 30px;font-size: 22px;" name="passwordMember" value=${ updateUser.passwordMember } ></input></td></tr>
<tr><th>手机号码</th><td><input type="text" style="width: 200px;height: 30px;font-size: 22px;" name="mobilePhone" value=${ updateUser.mobilePhone } ></input></td></tr>
<tr><th>固定电话</th><td><input type="text" style="width: 200px;height: 30px;font-size: 22px;" name="telephone" value=${ updateUser.telephone } ></input></td></tr>
<tr><th>详细地址</th><td><input type="text" style="width: 200px;height: 30px;font-size: 22px;" name="address" value=${ updateUser.address } ></input></td></tr>
<tr><th>职业</th><td><input type="text" style="width: 200px;height: 30px;font-size: 22px;" name="occuption" value=${ updateUser.occuption } ></input></td></tr>
<tr><th>收入水平</th><td><input type="text" style="width: 200px;height: 30px;font-size: 22px;" name="income" value=${ updateUser.income } ></input></td></tr>
<tr><td colspan=2><input type="submit" style="width: 90px;height: 30px;font-size: 22px;" id="saveInfo" value="提交" /></td></tr>
</table>
</form>
</div>
</body>
</html>
...全文
158 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

39,082

社区成员

发帖
与我相关
我的任务
社区描述
HTML5是构建Web内容的一种语言描述方式。HTML5是互联网的下一代标准,是构建以及呈现互联网内容的一种语言方式.被认为是互联网的核心技术之一。
社区管理员
  • HTML5社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧