Screenshot:
Usage:
<?php $conn = mysql_connect("localhost", "username", "password"); mysql_select_db ("mysql_db"); if (!$conn) { die('Could not connect: ' . mysql_error()); }
//check the source code for detailed phpDoc style comments $gridview = new GridView($conn, "SELECT * FROM sample"); $gridview->setAllowPaging(TRUE, "pg_class",2,"2,4,6,8,10"); $gridview->setAllowSorting(true); $gridview->setAllowSearch(true,"LastName"); $gridview->setGridCaption("Grid Caption"); $gridProperties = array( array("ID","id",Type::Label,""), array("FN","FirstName",Type::Link,"www.{0}{1}.com:LastName,FirstName:{FirstName}"), array("LN","LastName",Type::Label,""), array("email","email",Type::Label,""), array("phone","phone",Type::Label,""), array("blog","blog",Type::Link,"::myblog"), array("comments","comments",Type::Label,""), array("yes/no","bool",Type::CheckBox,"") ); $gridview->setStyleID("gridView"); $gridview->setGridProperties($gridProperties); $gridview->show(); ?>
The source for this class can be downloaded from phpclasses
Good Work Thanks
ReplyDelete