【发布时间】:2016-04-29 06:59:23
【问题描述】:
如何更改我的查询以选择所有未共享 ReportID 的数据?
所以所有'report.Report_Name, report.ReportDate, report.ReportID'
不匹配report.ReportID = Read_Report.ReportID
然后从report获取所有不匹配的内容
查询
$this->db->select('report.Report_Name, report.ReportDate, report.ReportID')
->from('report')
->join('Read_Report', 'report.ReportID = Read_Report.ReportID')
->where('Read_Report.StaffID', $this->session->userdata("StaffID"));
$result = $this->db->get();
return $result->result();
【问题讨论】:
-
你在哪个代码中翻译 sql ?
-
对不起,我正在使用 codeigniter
-
既然是select语句,你可以直接发送原始sql吗?
-
对不起@SamOrozco 你是什么意思
标签: php mysql sql codeigniter join