PHP Classes

phpMyDataGrid - AJAX Enabled Datagrid: Edit MySQL data in a table using AJAX for updates

Recommend this page to a friend!
  Info   View files Example   Screenshots Screenshots   View files View files (42)   DownloadInstall with Composer Download .zip   Reputation   Support forum (73)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 68%Total: 25,635 This week: 1All time: 21 This week: 560Down
Version License PHP version Categories
phpmydatagrid 1.0.2BSD License4.3HTML, Databases, AJAX
Description 

Author

This class can be used to Edit MySQL data in a table using AJAX for updates.

It can connect to a MySQL database directly or using ADODB and executes a query to retrieve data from a given table.

The MySQL table fields to display in the data grid table columns are configurable. The data from certain columns be displayed as images, totals or values calculated according to a given formula.

The data may also be displayed as bar charts.

The listing may have links to sort, add, edit, delete, search and view individual table records. The listing colors may be alternated and the rows may be highlighted when the user drags the mouse pointer over them. The links may be displayed with given icon images. The presentation of several aspects may be defined using CSS styles.

The record rows may be selected using respective form checkbox inputs.

A form may be presented to search for records with user defined values in given columns.

The records being listed or edited in place may be updated using AJAX request to avoid page reloading in any type of browser.

It may also show links or a form select input to go to the other pages when the listing split into multiple pages.

The text messages shown with the listing can be displayed in multiple languages. Currently English, Dutch, German, Spanish, French, Italian, Czech and Portuguese are built-in supported idioms.

Picture of Gustavo Arcila
Name: Gustavo Arcila <contact>
Classes: 3 packages by
Country: Colombia Colombia
Age: 48
All time rank: 391 in Colombia Colombia
Week rank: 411 Down2 in Colombia Colombia Down
Innovation award
Innovation award
Nominee: 1x

Winner: 1x

Recommendations

HTML5/PHP5.5 compliant datagrid
PHP5.5 compliant datagrid

Example

<?php /*
Copyright (c) 2007, Gurú Sistemas and/or Gustavo Adolfo Arcila Trujillo
All rights reserved.
www.gurusistemas.com

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
      in the documentation and/or other materials provided with the distribution.
    * Neither the name of the Gurú Sistemas Intl nor Gustavo Adolfo Arcila Trujillo nor the names of its contributors may be used to
      endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Please remember donating is one way to show your support, copy and paste in your internet browser the following link to make your donation
https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=tavoarcila%40gmail%2ecom&item_name=phpMyDataGrid%202007&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8

For more info, samples, tips, screenshots, help, contact, forum, please visit phpMyDataGrid site
http://www.gurusistemas.com/indexdatagrid.php

For contact author: tavoarcila at gmail dot com or info at gurusistemas dot com
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>phpMyDatagrid - Sample file</title>

<?php

   
/* Include class file */
   
include ("phpmydatagrid.class.php");
   
   
/* Create object */
   
$objGrid = new datagrid;

   
/* Define the "FORM" will be named employee and Must be
       created by the grid script */
   
$objGrid -> form('employee', true);
   
   
/* Connect with the database */
   
$objGrid -> conectadb("127.0.0.1", "phpclasses", "test", "guru");
   
   
/* Select the table to use */
   
$objGrid -> tabla ("employees");

   
/* Define fields to show */
   
$objGrid -> FormatColumn("id", "ID Employee", 5, 5, 1, "50", "center");
   
$objGrid -> FormatColumn("name", "Name", 30, 30, 0, "150", "left");
   
$objGrid -> FormatColumn("lastname", "Last name", 30, 30, 0, "150", "left");
   
$objGrid -> FormatColumn("age", "Age", 5, 5, 0, "50", "right");
   
$objGrid -> FormatColumn("afiliation", "Afiliation Date", 10, 10, 0, "100", "center", "date:dmy:/");
   
$objGrid -> FormatColumn("status", "Status", 5, 5, 0, "60", "left");
   
$objGrid -> FormatColumn("active", "Active", 2, 2, 0,"50", "center");
   
$objGrid -> FormatColumn("salary", "Salary", 10, 10, 0, "90", "right");
   
$objGrid -> FormatColumn("workeddays", "Work days", 5, 2, 0, "50", "right");

   
/* The setHeader function MUST be set between the <HEAD> and </HEAD>
       to correctly set the CSS and JS parameters */
   
$objGrid -> setHeader();
?>
</head>

<body>
<?php
   
/* draw the grid */
   
$objGrid -> grid();
   
   
/* Disconnect from database */
   
$objGrid -> desconectar();
?>
</body>
</html>


Screenshots  
  • sample_ajax_edition.png
  • sample_barchart.png
  • sample_barchart_images.png
  • sample_datagrid.png
  • sample_edit.png
  • sample_search_by.png
  Files folder image Files  
File Role Description
Files folder imagecss (1 file)
Files folder imageimages (19 files)
Files folder imagejs (1 file)
Files folder imagedocumentation (1 file)
Plain text file discount_code.txt Data Discount codes for ultimate version
Plain text file phpmydatagrid.class.php Class Main Class
Plain text file sample1.php Example Sample of use
Plain text file sample10.php Example Sample of use
Plain text file sample11.php Example Sample of use
Plain text file sample12.php Example Sample of use
Plain text file sample13.php Example Sample of use
Plain text file sample14.php Example Sample of use
Plain text file sample15.php Example Sample of use
Plain text file sample2.php Example Sample of use
Plain text file sample3.php Example Sample of use
Plain text file sample4.php Example Sample of use
Plain text file sample5.php Example Sample of use
Plain text file sample6.php Example Sample of use
Plain text file sample7.php Example Sample of use
Plain text file sample8.php Example Sample of use
Plain text file sample9.php Example Sample of use
Plain text file test.sql Data Data file
Plain text file ru_utf8.php Aux. UTF 8 file with russian translation
Plain text file ru_utf8_instructions.txt Doc. Instructions to russian

  Files folder image Files  /  css  
File Role Description
  Plain text file dgstyle.css Data Styles file

  Files folder image Files  /  images  
File Role Description
  Image file add.png Icon Icon Image
  Image file ajax.gif Icon Animated Image
  Image file asc.png Icon Icon Image
  Image file cancel.png Icon Icon Image
  Image file close.png Icon Icon Image
  Image file desc.png Icon Icon Image
  Image file down.png Icon Icon Image
  Image file down_off.png Icon Icon Image
  Image file edit.png Icon Icon Image
  Image file erase.png Icon Icon Image
  Image file locate.png Icon Icon Image
  Image file minidown.png Icon Image Icon
  Image file miniup.png Icon Image Icon
  Image file poweredby.png Icon Image Icon
  Image file save.png Icon Icon Image
  Image file search.png Icon icon image
  Image file up.png Icon Image Icon
  Image file up_off.png Icon Image Icon
  Image file view.png Icon Image Icon

  Files folder image Files  /  js  
File Role Description
  Plain text file dgscripts.js Data JavaScripts

  Files folder image Files  /  documentation  
File Role Description
  Plain text file documentation.txt Data Documentation

 Version Control Unique User Downloads Download Rankings  
 0%
Total:25,635
This week:1
All time:21
This week:560Down
User Ratings User Comments (15)
 All time
Utility:91%StarStarStarStarStar
Consistency:85%StarStarStarStarStar
Documentation:57%StarStarStar
Examples:86%StarStarStarStarStar
Tests:-
Videos:-
Overall:68%StarStarStarStar
Rank:363
 
very good
11 years ago (savvy)
70%StarStarStarStar
Very Good and usefull class.
12 years ago (Federico Franco Jaramillo)
70%StarStarStarStar
Excelente, aunque alguna funcionalidad mas no estaria mal.
13 years ago (Tony L. Requena)
70%StarStarStarStar
Great,owsome work done.
13 years ago (ChandrakantH)
80%StarStarStarStarStar
Sample9.
13 years ago (utkarsh13)
70%StarStarStarStar
A valuable code to solve the huge problem of displaying tabbe...
14 years ago (Mauricio Lorca)
77%StarStarStarStar
great work
14 years ago (arnol)
70%StarStarStarStar
thanks for posting this article also sharing this class code.
14 years ago (clifton)
75%StarStarStarStar
excellent support, clear and easy to manage,
15 years ago (Maria Parr)
80%StarStarStarStarStar
he ralizado las pruebas, sin embargo, al momento de registrar...
15 years ago (marcos)
55%StarStarStar
Nice for programmer
15 years ago (Yan Vedo Dirgantara Kondera)
77%StarStarStarStar
Package muy interesante.
15 years ago (Jacques SAINT-PIERRE)
77%StarStarStarStar
not truely cross browser compatible.
15 years ago (Josh Glasser)
50%StarStarStar
This a great package .
16 years ago (koko)
80%StarStarStarStarStar
Best AJAX enabled DB class
16 years ago (Nicolas Chapleau)
80%StarStarStarStarStar