[wp-hackers] Cloning content from Master site into new sites on a WP Network

Jesse Friedman highfive at jesserfriedman.com
Thu Jul 12 13:29:11 UTC 2012


Thanks Mike

I can query the database to make they are only getting what they wanted and
I can bring over taxonomy and meta data as well.  My question now is, is
writing a mysql query like this bad form?  It's just so much faster and
more efficient.

thanks,

Jesse

On Thu, Jul 12, 2012 at 9:13 AM, Mike Little <wordpress at zed1.com> wrote:

> On 12 July 2012 13:44, Jesse Friedman <highfive at jesserfriedman.com> wrote:
>
> > After all that from yesterday I simply wrote this today:
> >
> > $new_mysql_query = 'REPLACE INTO ntw_'.$newsiteid.'_posts SELECT * FROM
> > ntw_posts WHERE post_type="custom post type";';
> > $result = mysql_query($new_mysql_query);
> >
> > It works perfectly and is very fast.  Is this general bad practice and if
> > it is could you explain why?
> >
> >
> None of the metadata will be transferred (if there is any it could be
> things like prices, weights, etc). If there are any taxonomy terms
> associated with the products (keywords, colours, product categories, etc),
> those won't be transferred either.
>
> You originally mentioned users, selecting which products they wanted, now
> they get everything?
>
> Mike
> --
> Mike Little
> http://zed1.com/
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
thanks,

*Jesse Friedman*
508-507-9673 | jesserfriedman at gmail.com
http://jesserfriedman.com | @professor <http://twitter.com/professor>


More information about the wp-hackers mailing list