PHP, AJAX, MYSQL in action .. DataGrid
There are plenty of PHP data grid controls out there, but none that could satisfy me. I use data grids on almost every web site I develop. They come in great for displaying all kinds of data. I developed this data grid to suit all my needs and more.
|A few of the features include:
- Filtering and searching capabilities
- Ability to change column headers
- Capable of displaying images
- Ajax supported
- Automatic row paging
- Row selection
- Supports MySQL database
- Hide columns
- Sort columns
- Customizable look and feel through CSS
- Can handle large data sets
- Ability to add controls
- Checkbox support
- Specify column format types (such as percent, dollars, etc)
- Tested working in Firefox 2 and 3, IE 6 and 7, Chrome, Safari 3, and Opera 9
- PHP 5 only
- Much more!
Create dynamic-easy-to-use data grid controls for your web site in seconds!
The above datagrid is built in only 6 lines of code!
// file: ex1.php
// Load the database adapter
$db = new EyeMySQLAdap('localhost', 'root', '', 'people');
$dg = new EyeDataGrid($db); // Load the datagrid class
// Fetch all rows and columns from the `people` table
// Print the table
You can even make the above example Ajax enabled with 1 line of code!
// file: ex1-ajax.php
// Just call one function and your table is now totally Ajax enabled!
quoted from: www.eyesis.ca
The main differences between the two are:
- Body.Onload() event will be called only after the DOM and associated resources like images got loaded, but jQuery’s document.ready() event will be called once the DOM is loaded i.e., it wont wait for the resources like images to get loaded. Hence, the functions in jQuery’s ready event will get executed once the HTML structure is loaded without waiting for the resources.
- We can have multiple document.ready() in a page but Body.Onload() event cannot.