Can serialized arrays in DB be matched against serialized arrays with meta_query?

The one dirty option is using LIKE comparison in meta query request. It will just treat serialized value as string to make substring match against. It won’t be my first (or second) approach to rely on, but in some cases I had to do it like this.

Non-unique meta keys are a little tricky to work with, but they are much better way to store stuff you want to query by.

Leave a Comment