PHP Classes

File: Readme

Recommend this page to a friend!
  Classes of haseeb  >  Data Grid Component  >  Readme  >  Download  
File: Readme
Role: Documentation
Content type: text/plain
Description: Class Documentation
Class: Data Grid Component
Display MySQL query results in HTML tables
Author: By
Last change:
Date: 9 years ago
Size: 2,282 bytes


Class file image Download
About Datagrid Component

This datagrid component will make life easier for a php programmer by means of generating datagrid on the fly by supplying a few inputs to the datagrid method like width, height, no of records per page, etc

System Requirements
1. Php > 5
2. Mysql
3. Apache 2.0
4. OS - Any

In this component the main class is "" which has the following methods listed below:

       1.DataGrid($w,$h,$lmt,$qResult,$class,$thClass,$linkClass) // Class Constructor

1. DataGrid($w,$h,$lmt,$qResult,$class,$thClass,$linkClass) // Class Constructor
This method is the Datagrid class constructor which consists of the following parameters which has to be initialised during class object initialisation.
                   1.$w - Grid Width
                   2.$h  - Grid height
                   3.$lmt - Specifies how many records per page
                   4.$qResult - This is the mysql query result which has to be passed
                   5.$class    - This parameter takes the class name for the grid
                   6.$thClass - This parameter takes the class name for the grid heading row
                   7.$linkClass - This paramter takes the class name for the navigation links (eg: next, back)
This method will invoke the  GridData($result,$rec_limit) method.

This is the method which most of the grid display functionality. It takes two parameters one the query result and other the limit ie records per page.


                   DBClient.php class is the one which takes care of the db connection and query execution so this class has to be added. 
This class can be used individually for interacting with mysql database. This class supports php version greater than 5

              datagrid.php can be taken as the example for this class.