Show Posts
|
Pages: [1]
|
4
|
General Category / EasyUI for jQuery / calling php OOP method that retuns a JSON
|
on: September 14, 2012, 01:23:48 AM
|
I am try to use the example given in "Build CRUD Application with jQuery EasyUI", but this time round I have a PHP OOP function called get_data inside get_users.php i.e:
Class Users{ public function get_data() {
$rs = mysql_query("select * from users");
$items = array(); while($row = mysql_fetch_object($rs)){ array_push($items, $row); } $result["rows"] = $items;
echo json_encode($result); } }
How do I specify the function the url section of the table tag in index.html i.e
<table id="dg" title="My Users" class="easyui-datagrid" style="width:700px;height:250px" url="get_users.php?get_data" toolbar="#toolbar" pagination="true" rownumbers="true" fitColumns="true" singleSelect="true">
Since if I put the way I have done above it's not working?
|
|
|
|