Welcome Guest, Not a member yet? Register   Sign In
Generate Table from DB Query - Newbie question
#2

[eluser]TheFuzzy0ne[/eluser]
Welcome to the CodeIgniter forums.

If I understand you correctly, this is what you need:
Code:
$data['items'][]=$this->db->get_where('rental_items', array('item_id =' => $itemq['item_id']));

The way it's done currently, it overwrites the $data['items'] variable. By appending a set of empty square brackets, $data['items'] is treated as an array, and the new database result is pushed onto the end of that array.

Hope this helps.


Messages In This Thread
Generate Table from DB Query - Newbie question - by El Forum - 04-27-2009, 12:16 PM
Generate Table from DB Query - Newbie question - by El Forum - 04-28-2009, 05:57 AM
Generate Table from DB Query - Newbie question - by El Forum - 04-29-2009, 06:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB