我使用Postgres的,我想尝试date_diff,但我得到这个错误
Postgres的警告:pg_query():查询失败:ERROR:运营商不存在:布尔=整数LINE 1
Warning: pg_query(): Query failed: ERROR: operator does not exist: boolean = integer LINE 1
和那么这是我的查询
select id_mitra
,company_name
from ref_mitra
where reject=0 and DATE_DIFF(now(),date_status) > 3 and active='N'
我的查询出了什么问题?
显示你的表的描述请。也许'reject'是一个布尔值。 – Jens
如果要使用值0(零),则必须将此值转换为布尔值:reject = CAST(0作为布尔值) –
您需要将布尔值与布尔值“where reject = false”进行比较。 Postgres中也没有'date_diff'函数。 –