如何更改我的查詢以選擇所有未共享的數據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? – scaisEdge
對不起,即時通訊使用codeigniter – Beep
,因爲它是一個選擇語句,你可以只發送原始的SQL? –