how generate row and celd with html table ? |
[eluser]Asinox[/eluser]
Hi, all right here? ![]() ![]() Guys i need to generate 3 columns with 5 row with HTML TABLE and the data from the database... so,please, how ill generate a table with x rows and x columns? Thanks ![]()
[eluser]Colin Williams[/eluser]
http://ellislab.com/codeigniter/user-gui...table.html If your query returns 5 rows of 3 fields each, then you can pass the result to the HTML Table class, and voila!
[eluser]Asinox[/eluser]
yes, i readed the guide, but, there 's just make_column, but how ill generate just 3 rows , with make_column ill control the columns, but the rows...i just i want to control the rows, if i need to make 10 columns is fine, but 10 columns with just 3 rows... i dont know if im clear ![]() something like that: Code: <table>
[eluser]CroNiX[/eluser]
Didn't read the guide too closely ![]() Code: $this->table->add_row('CELD1', 'CELD2', 'CELD3', 'CELD4');
[eluser]Asinox[/eluser]
mmmm well i readed but i see that i not understand ![]() sorry, let me try Thanks
[eluser]Asinox[/eluser]
ok, i see i understand.... add_row add 1 row... but my data coming from database... maybe im lost, so, how ill show the data in x columns and just 3 rows when my data coming from the database thanks for u patience
[eluser]CroNiX[/eluser]
something like: Code: $query = $this->db->query("YOUR QUERY");
[eluser]Colin Williams[/eluser]
Read even closer. Like, the very first part: Quote:Here is an example of a table created from a database query result. The table class will automatically generate the headings based on the table names (or you can set your own headings using the set_heading() function described in the function reference below). Code: $this->load->library('table');
[eluser]CroNiX[/eluser]
Sure, assuming you are only grabbing what you want to output in your table. |
Welcome Guest, Not a member yet? Register Sign In |