Home › Forums › General Issues › Search in multiple ACF fields with specific meta_key value › Reply To: Search in multiple ACF fields with specific meta_key value
hello everyone,
I was trying to setup a custom query which should select data from a series of acf fields.
the matter is I don’t find a proper MySQL correct solution.
did another post on the matter, but it’s vertical to an issue: this one is more generalist.
each ACF post meta is a pair meta_key and a meta_value which have different values BUT, are single items in the DB structure…
so to a perform some search LIKE some text in those fields, is impossible to my limited MySQL knowledge 🙁
how can I say
SELECT that specific meta_value='some value'
WHEN it's parent meta_key = 'something'
AND some other meta_value='some other value'
WHEN it's parent meta_key = 'something else'
AND maybe it's meta_value also contains 'some%words'
sorry for this silly pseudo code, but I can’t find an easier way to ask you how to select and RETURN only specific ACF whose value is what I query…
ty!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We’re working hard on Advanced Custom Fields PRO 6.0, and Beta 1 is now available 🚀
— Advanced Custom Fields (@wp_acf) August 12, 2022
Featuring improved performance for Repeater fields with large datasets, and a new generation of ACF Blocks.
Let’s take a look 🧵https://t.co/Befre3kFAo
© 2022 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.