0

I need to extend some wp tables (wp_posts, wp_comments, wp_users) to store some additional fields. I can't use metadata because I need to query those values directly via MySQL. I need an help to choose if it's better to extend the original table or to define an additional one with those fields, with a 1-1 relationship to the original one. This second case will require an additional JOIN. Thanks.

eV

1

The second approach (joining additional table) is better for several reasons.

  • Thank you, the additional fields will have many updates. Thanks also for the useful links. – eVolts Oct 24 '11 at 14:58
1

Adding fields to WP's tables seems like a bad idea...what about using post meta and just JOINing on the post_meta table?

  • I need to have one record per element and not n records (or need to encode an array, because I need to query each field). – eVolts Oct 24 '11 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.