数据库查询语句遇到:Unknown column 解决方法
今天介绍一下数据库查询语句遇到错误报告解决方法:
根本原因:
是 sql 语句中使用的数据类型错误。
下面为之前错误的代码:
String cssn = request.GETPARAMETER (“CSSN”);String SQL ="select * from the client, where cssn =" cssn;/ / cssn is an integer type, applicable
下面为修改为正确的代码:(正确的)
String cssn = request.GETPARAMETER (“CSSN”);String SQL ="select * from the client, where cssn =" cssn "// Cssn is a string type applicable
因为” cssn ”为L000 查询时Cssn=’L000‘
以上是关于“数据库查询语句遇到:Unknown column 解决方法”的介绍,如需购买云服务器,推荐酷盾,独享IP、独享云服务器齐备,各类配置均有,免费帮助配置环境,挂载磁盘等,协助处理简单问题,同时提供快速0元备案,让你快速运营。
选购地址:
https://www.kufanyun.com/server/buy.html
THE END