[wp-hackers] MySQL View of every posts in a WP network
otto at ottodestruct.com
Wed Nov 23 13:53:47 UTC 2011
There is no such thing as a wildcard table specifier in SQL. So SELECT
* FROM wp_1_posts UNION ALL SELECT * FROM wp_2_posts UNION ALL SELECT
* FROM wp_3_posts... is the only way to do it.
Forget about it. Use PHP.
On Wed, Nov 23, 2011 at 5:07 AM, Carlo Gandolfo <carlo at artilibere.com> wrote:
> Hello everybody,
> I got a WP network whose posts tables are named:
> and I wish to build a view in MySql to gather all the contents (with limit
> 20) in a single block.
> That could be very useful to query and filter without having to loop
> through php.
> Anybody has hints to do that?
> Thank a lot,
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers