How to quickly develop a sortable, paged data grid of a MySQL table in PHP? [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this questionHow do I quickly develop a sortable, paged data 开发者_如何学运维grid of a MySQL table in PHP/JavaScript?
If the grid could sort/page and download data via AJAX it would work better, of course :)
I could develop it manually using AJAX to update the datagrid on sort/page navigation, but I was wondering if any datagrid components already existing that would do the same.
I've never used a PHP framework before so if you recommend one I'd appreciate some help in getting started configuring/using its features to get a MySQL table outputted as a datagrid.
There are lots of jQuery based solutions for sortable datagrids with AJAX support. Just do some googling for them.
For example: http://www.trirand.com/blog/?page_id=5
I have had good luck with the YUI DataTable: http://developer.yahoo.com/yui/datatable/
You can use it in almost any mode you want, but I prefer loading data over AJAX, as you suggested. It is quite good at doing this, and works effectively on any browser.
I found a few PHP/Javascript solutions that show datagrids of MySQL tables:
jqGrid is a grid component for ASP.NET & PHP, that supports row editing, sorting, paging, searching and even nested grids!
site
- Client-side javascript based on jQuery
- Theming based on jQuery UI (Themeroller)
- Support for all major databases (MS SQL, MySQL, PostgreSQL)
SlickGrid is an unlimited-scrolling grid component that supports sorting, and editors per column type, such as Checkboxes, Dates, Progress bars, etc.
blog entry
Ext.ux.Livegrid is a grid component that connects to a database backend and renders large sets of data into a grid, without the need of paging.
site
I have tried several different datagrid solutions, but I found them all somewhat cumbersome to work with. So I created an open source project that very easily converts any MySQL SELECT statement into a searchable, sortable, paginated datagrid: http://mysqlgrid.com or on Github: https://github.com/escalibore/mySqlGrid
I hope you find it useful!
精彩评论