tags:

views:

24

answers:

2

If I have tables in doctrine for user_1, user_2, etc. is there a way to dynamically set the table name in Doctrine for a single User model?

It's weird, I know. I'm trying to create an interface to a WordPress database (because WP has little to no API for directly accessing posts), and WP creates duplicate tables for each site, so there's a wp_posts, wp_comments, wp_2_posts, wp_2_comments, etc.

A: 

If it could, you would have to run migrations for each added/deleted user.

I am curious; why would you EVER need something like that?

Zeljko
I've edited my question to add some context.
gruner
A: 

I don't know how WP works, but here is the thing; each site should use it's OWN database, not to share it with others.

Zeljko