Welcome Guest, Not a member yet? Register   Sign In
Display Query Results in a Table
#1

[eluser]seanloving[/eluser]
I can display my query results in a table when I do this:

Code:
foreach ($content as $key=>$row)
{
     $this->table->add_row($content[$key]);
}

But what if I only want to display some of the columns instead of all the columns? What is wrong with my code?

Code:
foreach ($content as $key=>$row)
{
     $aray[$key] = (     $content[$key]['item_type'],
                         $content[$key]['item_desc'],
                         $content[$key]['mfr_id'],
                         $content[$key]['mfr_pn'],
                         $content[$key]['mfr_sn'],
                         $content[$key]['tag_id'] );

     $this->table->add_row($aray[$key]);
}

Probably something simple. Thanks.

--Sean Loving


Messages In This Thread
Display Query Results in a Table - by El Forum - 05-06-2009, 09:28 PM
Display Query Results in a Table - by El Forum - 05-06-2009, 09:52 PM
Display Query Results in a Table - by El Forum - 05-07-2009, 04:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB