Hi abu,
Is it possible to filter phpgrid data with more than one field(Search Json)?
e.g. WHERE NOT (i.mk_id=102 and ne ba'A ') ne= not equal
(written to ged rid of for invalid characters message)
"groupOp":"AND",
"rules":[
{"field":"mk_id","op":"eq","data":"102"},
{"field":"mk_id","op":"ne","data":"A"}
]
Regards…
Yes, it work as expected. If you are having some issues, email me the code for review.
Hi Abu,
WHERE NOT (i.mk_id=102 and ne ba'A ') ne= not equal
As you see where we put NOT of the above sql query in the Search Jsson Code ?
Thanks…
You can write this with NOT too.
See http://en.wikipedia.org/wiki/De_Morgan's_laws
Hi Abu,
I think I could not explain my question clearly to you.
WHERE NOT (i.mk_id=102 and ne ba'A ') ne= not equal
I am asking in below code where "NOT" can be placed to work same as above SQL code;
"groupOp":"AND",
"rules":[
{"field":"mk_id","op":"eq","data":"102"},
{"field":"mk_id","op":"ne","data":"A"}
]
Regards…
Yes, i understand what you asked. Alternate solution is to negate the conditions and change AND to OR. (d'morgan). This will produce same result.
"groupOp":"OR",
"rules":[
{"field":"mk_id","op":"ne","data":"102"},
{"field":"mk_id","op":"eq","data":"A"}
]