{"id":124,"date":"2011-02-17T14:58:21","date_gmt":"2011-02-17T19:58:21","guid":{"rendered":"http:\/\/cfdbplugin.com\/?page_id=124"},"modified":"2014-10-18T19:18:04","modified_gmt":"2014-10-18T23:18:04","slug":"debugging-filter-expressions","status":"publish","type":"page","link":"https:\/\/cfdbplugin.com\/?page_id=124","title":{"rendered":"Debugging Filter Expressions"},"content":{"rendered":"<p>If you have a complicated filter expression that may not be working right, you can get a printout of the parse tree. To do this, you add debug=&quot;true&quot;, e.g.<\/p>\n<p><code>[cfdb-table form=&quot;myform&quot; debug=&quot;true&quot;]<\/code>  <\/p>\n<p>For example, if you had&nbsp;<\/p>\n<p><code>[cfdb-table form=&quot;<\/code><code>myform<\/code><code>&quot; debug=&quot;true&quot; filter=&quot;aaa=bbb||ccc=ddd&amp;&amp;eee=fff&quot;]<\/code><\/p>\n<p>then you would get a dump like the following, where<\/p>\n<ul>\n<li>Tree Level 1 elements are ORed<\/li>\n<li>Tree Level 2 elements are ANDed<\/li>\n<li>Tree Level 3 elements are comparison expressions<\/li>\n<\/ul>\n<p><code>aaa=bbb||ccc=ddd&amp;&amp;eee=fff<\/code><\/p>\n<p>parses to:<\/p>\n<p><code>Array<br \/>\n(<br \/>\n&nbsp;&nbsp;&nbsp; [0] =&gt; Array<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0] =&gt; Array<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0] =&gt; aaa<br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sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [2] =&gt; ddd<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [1] =&gt; Array<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0] =&gt; eee<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [1] =&gt; =<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [2] =&gt; fff<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br \/>\n)<\/code><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you have a complicated filter expression that may not be working right, you can get a printout of the parse tree. To do this, you add debug=&quot;true&quot;, e.g. For example, if you had&nbsp; then you would get a dump like the following, where Tree Level 1 elements are ORed Tree Level 2 elements are [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1069,"menu_order":11,"comment_status":"closed","ping_status":"closed","template":"page-without-sidebar.php","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"class_list":["post-124","page","type-page","status-publish","hentry"],"jetpack_shortlink":"https:\/\/wp.me\/P1mptf-20","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/cfdbplugin.com\/index.php?rest_route=\/wp\/v2\/pages\/124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cfdbplugin.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cfdbplugin.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cfdbplugin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cfdbplugin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=124"}],"version-history":[{"count":13,"href":"https:\/\/cfdbplugin.com\/index.php?rest_route=\/wp\/v2\/pages\/124\/revisions"}],"predecessor-version":[{"id":432,"href":"https:\/\/cfdbplugin.com\/index.php?rest_route=\/wp\/v2\/pages\/124\/revisions\/432"}],"up":[{"embeddable":true,"href":"https:\/\/cfdbplugin.com\/index.php?rest_route=\/wp\/v2\/pages\/1069"}],"wp:attachment":[{"href":"https:\/\/cfdbplugin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}