我需要在查询中包含今天的日期。
SELECT *
FROM
transactions, machine
WHERE
transactions.machineid::int8 = machine.machineid::int8 AND
(machine.storeid = '".$_SESSION['user_session']."')
在交易表中是一个日期列。
答案 0 :(得分:0)
SELECT *
FROM
transactions, machine
WHERE
transactions.machineid::int8 = machine.machineid::int8 AND
(machine.storeid = ? )
AND date = ?