您的SQL语法有错误

时间:2016-10-25 08:24:20

标签: php

你可以在这个查询中帮我修复SQL语法吗?

SELECT percent FROM `freedelivery` 
WHERE freedelivery.id_currency=1 AND freedelivery.price>0 AND freedelivery.price<=2722,5 
AND freedelivery.percent>0 AND freedelivery.percent<=100 AND '2016-10-25' 
BETWEEN freedelivery.`from` AND freedelivery.`till`

我收到错误“你的sql语法中有错误。”。

由于

1 个答案:

答案 0 :(得分:1)

SELECT percent FROM `freedelivery` WHERE freedelivery.id_currency=1 AND freedelivery.price>0 AND freedelivery.price<=2722.5 AND freedelivery.percent>0 AND freedelivery.percent<=100 AND '2016-10-25' BETWEEN freedelivery.`from` AND freedelivery.`till`

“2722,5”上的逗号似乎不合适。也许它是2722.5