This is a migrated thread and some comments may be shown as answers.

Dynamic FilteringServer Using PHP

0 Answers 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rizky
Top achievements
Rank 1
Rizky asked on 15 Sep 2012, 05:10 AM
Hello, I'm Develop Application Use SLIM PHP FRAMEWORK, IDIORM, PARIS, TWIG & KENDOUI.
I Get Response filteringServer with this : 
"filter":{
    "filters":[
        {"logic":"or","filters":[
            {"field":"NAME","operator":"eq","value":"Rosadi"},
            {"field":"NAME","operator":"eq","value":"Rahmat"}
            ]},
        {"logic":"or","filters":[
            {"field":"GENDER","operator":"eq","value":"L"},
            {"field":"GENDER","operator":"eq","value":"P"}
        ]}
    ],"logic":"and"}

and I want generate filtering Server Dynamically using php
<?
$Filter = $_REQUEST["filter"];
if(isset($Filter))
{
    foreach($Filter["filters"] as $FilterColumn)
    {
        $employeeList = $employeeList ->where($FilterColumn['field'], $FilterColumn['value']);
    }
}
?>

the php code above is wrong, make me get stuck.
can anyone help me how make filtering dynamically (the response implement in php code)  ?
sorry for my bad english.

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Rizky
Top achievements
Rank 1
Share this question
or