Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/uzitech/showmysqltable

Display a table from a mysql database that users can filter
https://github.com/uzitech/showmysqltable

Last synced: 16 days ago
JSON representation

Display a table from a mysql database that users can filter

Awesome Lists containing this project

README

        

showMySQLTable
==============

Display a table or view from a mysql database that users can filter

Usage:
======
```
getMessage());
}
$showTable->setDatabase($db);

//set table or view you want to display
$showTable->setTableName("my_table_or_view");

//set column names
$showTable->setColumnNames(array(
"id" => "Customer Id",
"date" => "Date Entered",
"name" => "Customer Name",
"active" => "Active"

//set column types
$activeEnum = array(
"0" => "No",
"1" => "Yes",
);
$showTable->setColumnTypes(array(
"id" => "int",
"date" => "datetime",
"name" => "string",
"active" => $activeEnum
));

//set default columns
$showTable->setColumnTypes(array(
"name",
"date"
));

?>


My table




= $showTable->printFilters() ?>
= $showTable->printHTML() ?>

```