Retrieve data for display in a specific format : <p>i have two mysql tables <code>order</code> and <code>orderitems</code>.<br>
now i want to display these data using angularjs on a separate monitor.<br>
My table structure:<br>
Table <code>order</code> contains <code>id, table_id, date_time</code><br>
Table <code>orderitems</code> contains <code>order_id, food_item, item_qty, dalivery</code><br></p>

<p>Now i want to display these data inside seperate html div's. <code>table_id</code> as Heading and <code>orderitems</code> as contents.<br></p>

<p>For that i want a data structure like this<br></p>

<pre><code>[{
 table_id,
 date_time,
 items: [
    {
   food_item,
   item_qty,
   delivery
},
{
   food_item,
   item_qty,
   delivery
}
]
}]
</code></pre>

<p><br>
So how do i make query using codeigniter or MySQL?</p>
