[wp-hackers] Duplicate key=value pairs in wp_postmeta

scribu scribu at gmail.com
Thu Feb 26 16:13:47 GMT 2009


Ok, I suppose it wouldn't be a good idea. Nevermind.

On 2/26/09, aesqe <aesqe at skyphe.org> wrote:
> i think this is the right behavior - how else would a plugin like
> flutter have grouped custom fields?
>
> i don't know how many of you are familiar with flutter, but here's an
> example:
>
> let's say you have a group called reviews, and that group can be duplicated.
>
> let's say that it has three fields:
>
> * reviewer_name
> * reviewer_magazine
> * review_text
>
> and if two journalists from the same magazine write a review about that
> particular post (which is actually a book, or a movie, etc)
>
> then too, you'd have the same situation:
>
> *meta_id*  *post_id*  *meta_key *		*meta_value*
>    001          001     reviewer_magazine	    bar
>    002          001     reviewer_magazine	    bar
>
> and flutter has its own table in which it stores relations between
> custom fields and groups, so this works jus fine.
>
> On 26.2.2009 16:15, scribu wrote:
>> I'm not talking about multiple values for the same key on the same post,
>> i'm
>> talking about something like this:
>>
>> *meta_id*  *post_id*  *meta_key * *meta_value*
>>   001          001         foo             bar
>>   002          001         foo             bar
>>
>> On Thu, Feb 26, 2009 at 4:27 PM, Will
>> Anderson<wp-hackers at itsananderson.com
>>> wrote:
>>
>>> When you store multiple key/value pairs for a post, that key is turned
>>> into
>>> an array.
>>>
>>> I think it's pretty obvious from the function signature (with the $single
>>> argument) that this is intentional.
>>>
>
> --
> -._______________KAWAII!_______________.-
> Skyphe.org : It'll all make sense one day
> http://skyphe.org .:. http://breedart.org
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


-- 
http://scribu.net


More information about the wp-hackers mailing list