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
#2

[eluser]seanloving[/eluser]
try this

Code:
$aray[$key] = array(...
#3

[eluser]TheFuzzy0ne[/eluser]
Array is two Rs by the way. Smile




Theme © iAndrew 2016 - Forum software by © MyBB