比较 strftime() return 值不起作用
Comparison of strftime() return value does not work
sqlite 别名无法正常工作
SELECT *,strftime('%s', `created_at`) AS `created_at_timestamp` FROM `sales` WHERE `created_at_timestamp` >= 1607966400 ORDER BY `created_at` DESC
这给出了结果,即使结果应该是 0
An INTEGER or REAL value is less than any TEXT or BLOB value.
strftime()
的return值是一个字符串。如果您想将它与数字进行比较,请先 convert 将其转换为数字。
sqlite 别名无法正常工作
SELECT *,strftime('%s', `created_at`) AS `created_at_timestamp` FROM `sales` WHERE `created_at_timestamp` >= 1607966400 ORDER BY `created_at` DESC
这给出了结果,即使结果应该是 0
An INTEGER or REAL value is less than any TEXT or BLOB value.
strftime()
的return值是一个字符串。如果您想将它与数字进行比较,请先 convert 将其转换为数字。