Innovative Computer Solutions,
Development & Technical Support

07975 997026 • enquiries[delete-me]@[delete-me]harpanet.com

User Tools

Site Tools


programming:php:codeigniter:my_table:index

hArpanet MY_Table Library for CodeIgniter

This file 'overrides' the standard CI HTML Table Library, extending its flexibility and functionality.

The MY_Table Library provides extended functions that enable you to auto-generate HTML tables from arrays or, more usefully, directly from database result sets.

See https://github.com/hArpanet/CodeIgniter_MY_Table

Purpose

The standard CodeIgniter Table class does not provide flexible tools for working with database result sets. MY_Table is designed to rectify this deficiency and allow rapid table generation with flexible table manipulation tools (allowing similar functionality to other DataGrid libraries). Therefore, MY_Table simply extends CI_Table.

Pre-Requirements

To use MY_Table, you should already be familiar with generating tables using the standard CodeIgniter Table class. The documentation is available at: http://ellislab.com/codeigniter/user-guide/libraries/table.html

Initialising the Class

File Location

hArpanet MY_Table is a Library override for CI, and should be located at:

/application/libraries/MY_Table.php

Like most other classes in CodeIgniter, the Table class is initialized in your controller using the load→library method. As MY_Table is an override for the standard CodeIgniter Table class, it is initialised using the standard format:

$this->load->library('table');

Once loaded, the MY_Table library object will be available using:

$this->table

General Usage Principles

Show:

MY_Table Methods

Click any method name below for full details, examples, etc.

FLAGS

Various boolean flags to enable/disable certain operations during table processing.

Show:

STRUCTURE

Show:

HEADINGS

Show:

COLUMNS

Show:

CELLS

Show:

PERSISTENCE

Show:

ROWS

Show:

PAGING

Show:

programming/php/codeigniter/my_table/index.txt · Last modified: 28/09/2013 11:20 by harpanet