Data Grid in PHP [closed]

随声附和 提交于 2019-12-18 13:49:01

问题


I want to use data grid in php to fetch data from a store procedure. Please give me some implemented examples. how to use it in my projects.

I am using mysql store procedures.

Thanks


回答1:


You can use http://phpgrid.com

$dg = new C_DataGrid("SELECT * FROM orders", "orderNumber", "orders"); 

// change column titles
$dg->set_col_title("orderNumber", "Order No.");
$dg->set_col_title("orderDate", "Order Date");
$dg->set_col_title("shippedDate", "Shipped Date");
$dg->set_col_title("customerNumber", "Customer No.");

// hide a column
$dg -> set_col_hidden("requiredDate");

// change default caption
$dg -> set_caption("Orders List");

$dg -> display();

examples can be found on http://phpgrid.com/example/

it's easy to use and looks pretty.




回答2:


Do you need to edit the data or just display only? If just display, you should take at look at the local array data source example.

1.Return array from MySQL stored procedure, see this example: http://php.net/manual/en/mysqli.quickstart.stored-procedures.php,

2.Then use the phpGrid local array feature to display datagrid http://phpgrid.com/example/local_array_data_source/

That's it!




回答3:


Second phpGrid from http://phpgrid.com. I work for local school district. Trust me, we got a lot database tables to manage spread across multiple systems. phpGrid by far the best tool I've used to quickly develop web based content administration system.



来源:https://stackoverflow.com/questions/16418873/data-grid-in-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!