简体   繁体   English

sql查询到codeigniter活动记录

[英]sql query to codeigniter active record

how do i write this in codeigniter active records? 我该如何在codeigniter活动记录中编写此内容?

  MAX(conversations_messages.message_date) > conversations_members.conversation_last_view AS conversation_unread 

I tried this $this->db->select_max('conversations_messages.message_date' > 'conversations_messages.conversation_last_view', 'conversation_unread'); 我尝试了这个$this->db->select_max('conversations_messages.message_date' > 'conversations_messages.conversation_last_view', 'conversation_unread');

but it said The query you submitted is not valid. 但它说您提交的查询无效。 Filename: C:\\wamp\\www\\system\\database\\DB_active_rec.php Line Number: 184 文件名:C:\\ wamp \\ www \\ system \\ database \\ DB_active_rec.php行号:184

already solved it. 已经解决了 these might help someone someday 这些可能有一天会帮助某人

  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');

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM