pymssql我通过以下代码查询时 发现日期并没有进入resultList中 resultList中日期对应的位置都是0def searchStockInself #获取输入 name = selfnameLineEdittext category = selfcategoryLineEdittext supplier = selfsuppl
根据您提供的代码,我注意到在生成查询语句时,对于日期的条件没有正确添加引号。在以下代码行中:
conditions.append(f"date='{date}")
应该修改为:
conditions.append(f"date='{date}'")
这将确保日期条件正确添加到查询语句中。请尝试修改代码并再次运行查询,看看是否解决了日期没有进入resultList的问题。
原文地址: https://www.cveoy.top/t/topic/i8Nx 著作权归作者所有。请勿转载和采集!