gpt4 book ai didi

php - 将 mysql 查询转换为 codeigniter 事件记录

转载 作者:行者123 更新时间:2023-11-29 00:36:16 26 4
gpt4 key购买 nike

我有这样的 mysql 查询:

SELECT * FROM ms_project_log 
INNER JOIN ms_project ON ms_project_log.iwo_no = ms_project.iwo_no
WHERE ms_project_log.iwo_no = '0007/NMS/BOTM/01/12'
ORDER BY ms_project_log.log_date DESC

如何转换为codeigniter active record?

最佳答案

这是给你的代码

$this->db->select('*');
$this->db->from('ms_project_log');
$this->db->join('ms_project','ms_project_log.iwo_no=ms_project_iwo_no', 'inner');
$this->db->where(ms_project_log.iwo_no, '0007/NMS/BOTM/01/12');
$this->db->order_by("ms_project_log.log_date", "desc");
$this->db->get();

关于php - 将 mysql 查询转换为 codeigniter 事件记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14150528/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com