我如何在codeigniter活动记录中写这个?
MAX(conversations_messages.message_date) > conversations_members.conversation_last_view AS conversation_unread
我试过这个$this->db->select_max('conversations_messages.message_date' > 'conversations_messages.conversation_last_view', 'conversation_unread');
但它说您提交的查询无效。 文件名:C:\ wamp \ www \ system \ database \ DB_active_rec.php 行号:184
答案 0 :(得分:0)
已经解决了。这些可能有一天会帮助某人
MAX(conversations_messages.message_date) > conversations_members.conversation_last_view AS conversation_unread
$this->db->select_max('conversations_messages.message_date > conversations_members.conversation_last_view', 'conversation_unread');