admin管理员组

文章数量:1610829

@[TOC](Error Code: 1064. 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 '*) from k_ie_out_calculate_ht t
)

出现这个报错,这边是因为 count和(*) 之间多了空格,去掉两者之间空格即正常执行,我的MYSQL DB是8.0.12版本

图片: 20:34:58 select count () from k_ie_out_calculate_ht t where t.workdate = ‘2019/05/21’ order by t.pdline_name Error Code: 1064. 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 ') from k_ie_out_calculate_ht t where t.workdate = ‘2019/05/21’ order by t.pdl’ at line 1 0.000 sec
错误代码如下:

//SQL:
select count (*) from k_ie_out_calculate_ht  t where t.workdate = '" + txtSearchTime.Text.Trim() + "'"

应改成(去掉count和(*)之间的空格)

//SQL:
select count(*) from k_ie_out_calculate_ht  t where t.workdate = '" + txtSearchTime.Text.Trim() + "'"

本文标签: ValidPosition