Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试从以下三个表中获取输出:
我想从每个日期的历史记录中获取包含客户信息及其最新项目的域的输出。
我正在使用 CodeIgniter:
$this->db->select( ->from() ->where() ->join()
您需要的查询类似于:
SELECT * FROM domains d LEFT JOIN customers c ON d.Customer = c.id LEFT JOIN history h ON h.domain_id = d.id ORDER BY h.date desc
您需要自己将其放入 Code Igniter - 我已经猜到了一些字段名称,我相信您可以想出它们。