php – Codeigniter Active Record HAVING / WHERE db.field = d
发布时间:2020-12-13 17:44:30 所属栏目:PHP教程 来源:网络整理
导读:有人可以告诉我,如果有可能与积极的记录 – 以及如何? $this-db-select('*');$this-db-from('table1');$this-db-join('table2','table1.id = table2.fi_id','left');$this-db-having('table1.second_id','table2.fi_second_id',false);$query = $this-db-ge
有人可以告诉我,如果有可能与积极的记录 – 以及如何?
$this->db->select('*'); $this->db->from('table1'); $this->db->join('table2','table1.id = table2.fi_id','left'); $this->db->having('table1.second_id','table2.fi_second_id',false); $query = $this->db->get(); 问题是,’table2.fi_second_id’始终被视为字符串 – 而不是数据库字段.用’where’来试试这个问题 – 这是同样的问题. 谢谢 解决方法
我想你想要以下内容:
$this->db->having('table1.second_id = table2.fi_second_id',false); 如果不需要转义的SQL查询,则可能应用也可能不应用false参数. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- php项目开发中用到的快速排序算法分析
- php – 使用zipArchive addFile()不会将图像添加到zip
- PHP编程:详解WordPress中过滤链接与过滤SQL语句的方法
- 简单的自定义php模板引擎
- PHP实现蛇形矩阵,回环矩阵及数字螺旋矩阵的方法分析
- php – 警告:preg_match()[function.preg-match]:未知的修
- php addslashes及其他清除空格的方法是不安全的
- php – 代码点火器第三方,$this-> load-> add_package_pat
- php google或baidu分页代码
- php – Zend Framework 1.9和Doctrine Integration