Welcome Guest, Not a member yet? Register   Sign In
how to display data from the db in html tables dynamically?
#10

[eluser]towki[/eluser]
[quote author="theprodigy" date="1344227722"]Personally, I don't use the table class, but if I did, I would do something like:

controller
Code:
$this->load->library('table');

$records = $this->my_model->getSomething();

$data['table'] = $this->table->generate($records);

$this->load->view('myview', $data);

view
Code:
<!--
stuff above
-->
<?php echo $table; ?>
<!--
stuff below
-->
[/quote]

thanks. I got the idea now.. but could you give me examples on generating a table for all of my columns in the database except for the ID column only. Normally I would use the SELECT ALL query but i dont want the id of the person to be displayed in the generated html table. sorry if my english was confusing??


Messages In This Thread
how to display data from the db in html tables dynamically? - by El Forum - 08-05-2012, 10:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB