【发布时间】:2016-09-29 02:44:37
【问题描述】:
我有一个mysql查询:
SELECT `percentage` FROM `discount_percentage` WHERE `agent_id`=$agent_id AND `insurance_type_id`=$insurance_type and `entity_id`=$entity_id and `state_id`=$state_id AND CURDATE() between from_date and to_date
我想改变 CURDATE TO php 函数 但是 date(Y-m-d) 不起作用。
以及如何将其更改为纯 codeigniter?
【问题讨论】:
-
你试过
NOW()而不是CURDATE()吗?
标签: php mysql codeigniter date