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
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.
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!
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.