Codeigniter MySQL Left Join Include SelectPhp

PHP-Programmierer chatten hier
Anonymous
 Codeigniter MySQL Left Join Include Select

Post by Anonymous »

Wie konvertiert man den Left-Join-Include-Select in die Codeigniter-SQL-Methode? Danke. Ich möchte es nur wissen.

Code: Select all

SELECT c1.c1_id, c1.c1_name, c2.c2_id, c2.c2_name, c2.c2_type, c2.c2_status, f.f_id, f.f_name, f2.f2_id, f2.f2_name FROM category2 c2
LEFT JOIN category1 c1 ON c1.c1_id = c2.c1_id
LEFT JOIN (
SELECT DISTINCT c2_id, f_id, f_name FROM file ORDER BY f_id DESC
) f ON f.c2_id = c2.c2_id
LEFT JOIN (
SELECT DISTINCT c2_id, f2_id, f2_name FROM file2 ORDER BY f2_id DESC
) f2 ON f2.c2_id = c2.c2_id
WHERE c2.c2_status = 1
GROUP BY c2.c2_id

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post