Hi gentlemen,
I'm using phpgrid with MySQL database without any problem.
I want to use it with a json request.
The target is to build the answer requesting in differents database.
The to return answer in JSON.
Do you know if it's possible and if someone have an example?
Thanks for your help.
Regards.
LGN
2 Answers
Hi LGN,
I think a solution is format your JSON like this:
{
"1":[{"id":"1","created":"2010-03-19 ","name":"peter"}],
"2":[{"id":"2","created":"2010-03-19 ","name":"john"}],
"3":[{"id":"3","created":"2010-03-19 ","name":"michael"}]
}
In PHP use $data = json_decode($json_response) to get a multidimensional array. Then assign it to jqgrid $grid->table = $data;
It is a possible solution.
Regards!
Your Answer