I've about 100 posts in wordpress, with a meta_key of cost along with a value.
Wouldso would Time passes about searching through all posts having a value between 23.00 and 41.00 for instance?
I understand that 'meta_compare ' goodies 'meta_value' like a string, and so i can't make use of this to resolve my problem. Anybody have clues? Thanks
I'd attempt to implement the
posts_where filter, and customize the query there. It will get known as immediately after the meta comparison is added, also it enables you to definitely alter the
WHERE a part of your query. You have to replace all cases of your meta answer to
CAST(meta_key AS DECIMAL(5,2)). I suppose the meta secret is prefixed through the meta table title, check for your. You will have to discover a method to pass through two
meta_value parameters if you wish to perform a
BETWEEN query, however, you can mix all of them with a comma and split them up inside your filter. As lengthy like a valid SQL where-clause arrives individuals filter, everything should work.