[wp-hackers] Sorting on Custom Fields
mikeschinkel at newclarity.net
Tue Jul 13 20:37:07 UTC 2010
Can you give some examples, in English, of the queries you'd like to perform, especially the more complex ones?
On Jul 13, 2010, at 3:00 PM, Kevin Newman <CaptainN at unFocus.com> wrote:
> I'm creating a plugin which will extend the post with a ton of custom fields (50 or so per post, mostly booleans, some numbers and some text). I'll need to be able to ORDER BY (to use SQL terminology) these fields (as well as search on them).
> There is a plugin called wp-smart-sort which seems to do sorting by looping through the results of a custom query and storing the post data in an array and ordering that in memory ("seems to", because I didn't take the code apart all that thoroughly).
> I'm leaning toward using a custom table, because sorting in server memory seems inefficient, and I have a crazy number of values anyway. But serializing those in a single custom field, doesn't seem crazy either.
> Anyway, I'd love to see opinions on this. :-)
> Kevin N.
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers