[wp-hackers] Term Meta - Trac'd already?

Mike Schinkel mikeschinkel at newclarity.net
Wed Jul 13 21:55:08 UTC 2011

On Jul 13, 2011, at 5:43 PM, Charles Frees-Melvin wrote:
> 2.  the original example of this thread that we could add a second column that could contan an array that would add meta like image URLs etc. as this would only be used is a term is used it would not need to be searchable and would not need be a large load of needing an extra table.

Please say no to storing serialized arrays in MySQL fields except for in rare cases.

Adding an array of meta for that type of information would be problematic because it would disable any potential SQL querying.  That is essentially how NextGen Gallery handles relationships between galleries and albums and it makes it effectively impossible to get data sorted and filtered for some real-world use-cases (this assumes they've not added a table since I last used it.) I had to add a table to make it work for the client and I don't like having to modify plugins like that.

At the risk of making a statement that has potential leaks, serialized arrays should only even ever be used in the wp_options table where joining, sorting or filtering (probably) won't ever be required.


More information about the wp-hackers mailing list