Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mysql 将30份分为三批_Mysql_Jsp - Fatal编程技术网

Mysql 将30份分为三批

Mysql 将30份分为三批,mysql,jsp,Mysql,Jsp,教室里有30个学生。我想通过在jsp中使用mysql查询将它们分为三个批次 最初我使用下面的查询 connection = DriverManager.getConnection(connectionURL, "root", "student"); String queryString = "update student set batch=?,exam=? where studentid='"+studentid+"' "; pstatement = connection.prepareSt

教室里有30个学生。我想通过在jsp中使用mysql查询将它们分为三个批次

最初我使用下面的查询

connection = DriverManager.getConnection(connectionURL, "root", "student");
String queryString = "update student set batch=?,exam=? where studentid='"+studentid+"'  ";
pstatement = connection.prepareStatement(queryString);
pstatement.setString(1, batch);
pstatement.setString(2, exam);

我没有评论的特权,但检查用户界面是否正确发送了第二个学生信息会有帮助。我觉得这个问题还可以

你能给我们看看你的错误输出吗?您的查询语法可能有点不正确。先生,我添加了一个快照,请查找您没有提供足够的帮助,对不起。对不起,我将尝试解释您将分为三批