[wp-hackers] MySQL queries to add to wp_postmeta

Joel Fisher joelfisher at gmail.com
Mon Jul 12 23:14:14 UTC 2010


Basically it is just a custom field.

I want every post that currently does NOT have the meta_key = members
to get it and also set the meta_value = false.

Does that make sense?

So, it is the same key and the same value for all posts that does not
currently have it set.


joel.fisher
www.flushinc.com

Linkedin: http://www.linkedin.com/in/jfisher
Follow: www.twitter.com/joelmoney




On Mon, Jul 12, 2010 at 7:12 PM, Mike Schinkel
<mikeschinkel at newclarity.net> wrote:
> How are you going to generate the queries?  In an Excel spreadsheet and run them all, or by calling a function that issues the SQL, or something else.  IOW, where is your metadata coming from?
>
> -Mike
>
> On Jul 12, 2010, at 7:08 PM, Joel Fisher wrote:
>
>> I have a ton of posts that I need to add a meta_key and meta_value too.
>> Some posts, it already exists so I don't want to overwrite.
>>
>> Basically I want to add it to ALL posts that do NOT have it already.
>>
>> Can someone point me to a MySQL query or alternative method to add this data?
>>
>> Thanks.
>>
>>
>>
>> joel.fisher
>> www.flushinc.com
>>
>> Linkedin: http://www.linkedin.com/in/jfisher
>> Follow: www.twitter.com/joelmoney
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list