Home › Forums › Front-end Issues › Query posts by user relationship field › Reply To: Query posts by user relationship field
I missed your question about 'meta_value' => ':' . $post_ID . ';'
But I did look at this. Looking back to your data in the database, meta ID 5823 that meta query for post ID of 1 would match i:1;s:3:"857";
. To be honest I can’t say how much this will affect things. I have with post IDs in the 6 digit range. In this case I’d only be safe looking for posts ID > 6.
I also have clients with > 20 posts in a relationship field so I would only be safe if the post ID is greater than 20 or 30 or it would match the a:22
portion of the serialized array. You could potentially limit this by using I missed your question about 'meta_value' => 'i:' . $post_ID . ';'
but that would not eliminate matching array indexes that match post ID values.
I have never liked serialized data as a storage mechanism, but that’s WP.
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 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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.