[support] Mass Changing UID
Shai Gluskin
shai at content2zero.com
Tue Aug 5 19:09:23 UTC 2008
Earnie,
You'd run node_save() in devel's drupal execute block? Does it resave every
single node?
Thanks,
Shai
On Tue, Aug 5, 2008 at 3:07 PM, Earnie Boyd <earnie at users.sourceforge.net>wrote:
> Quoting Shai Gluskin <shai at content2zero.com>:
>
> > Drupal Mavens,
> >
> > On a site with about 600 nodes I need to change the node author on about
> 300
> > of them. It's very straightforward in that everything that is written by
> > uid="2" needs to change to uid="4".
> >
> > I was about to write a simple sql query to implement in phpMyAdmin but
> > thought I'd come here first (*and* back up the db).
> >
> > I'm seeing uid in two tables: node and node_revisions. Does UID exist
> > anywhere else?
> >
> > Also, would I be fine with just changing it in the node_revisions table?
> >
> >
>
> The safer method is to node_load(), change the data and then
> node_save(). This gives any contrib modules you have a chance to do
> anything necessary.
>
> Earnie -- http://for-my-kids.com/
> -- http://give-me-an-offer.com/
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20080805/6365d488/attachment-0001.htm
More information about the support
mailing list