How to use Customized WHERE
-
Hi,
I′m working on moving some custom post types and custom fields from older plugins to Pods.
One post type is “local authoroty” which could be “kind” of “local community”, “district” or “state” – that I have defined in a custom field “kind” in this custom post type.
Now I want assign the local authooties to his district (if it is a “local community”) and state (if it is a “local community” or a “district”).
I did this by creating two custom fields “district” and “state” with field type “Relationship”, Related To “local authoroty”, Selection Type “Single Select”.
To reduce the selection to relevant local authorities of kind “district” or “state” I thought I can put “_pods_kind=’district'” into the Custom WHERE field in “Additional Field Options” tab. But I get error messages like
“Database Error; SQL: SELECT DISTINCTt
.ID
,t
.post_title
,t
.post_parent
,t
.post_type
FROMwp_49_posts
ASt
WHERE ( ( _pods_kind =\’district\’ ) AND ….; Response: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘\’district\’ ) AND ….
Now I found in Pods documentation, that this Customized WHERE might be for Special Magic Tags.
Do I need an other syntax in the Customized WHERE field or is there an other way to acchieve this?
Thanks for help – and for this helpful plugin!
Bernhard
- The topic ‘How to use Customized WHERE’ is closed to new replies.