Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/uzitech/showmysqltable
- Owner: UziTech
- Created: 2014-07-14T21:27:40.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T05:44:32.000Z (11 months ago)
- Last Synced: 2024-10-15T12:18:46.844Z (about 1 month ago)
- Language: PHP
- Size: 17.6 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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() ?>
```