Many to Many Join Query in CodeIgniter -


All previous attempts at JOIN have left me with disk or item data, which is the result of the ID, the result of the title key (

  item table field: id, headline disk table field: id, title item_date table field: item_id, disc_id  

/ code>

How do I create a double join so that I can use a disc related to an item. Currently I will send two different questions For a single item record, then for a single disk array.

In addition to being included in a query, if I ever want to get more than 1 record , I currently have to run 2 queries per item because I can not be included in my data.

Please help !! I think this is my last many many obstacles (though speaking very soon Dare not ).

Because both items and discs have column names and titles, they will overwrite each other title as item_title, d.title as item i, disc d, item_disc as i.id = Order by m.item_id and d.id = m.disc_id i.title, d.title

for an item and its disk:

  M. *, I.title item items, as d.title item i, disc d, item_disc m from discrete. Id = m.item_id =? And replace d.title  

by the d.id = m.disc_id command? Items you want with


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -