Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为什么这不起作用?
$allRecords = RecordsQuery::create() ->where('SUBSTR(Records.paymentTime, 1, 7) = ?', '2013-02') ->findOne(); // var_dump($allRecords);
它只是返回null。如果我将其用作 SQL 命令,它将返回正确的记录。
Records.paymentTime 是一个日期字段。
真诚的。