Search

Apologies if this has already been asked; I must be searching for the wrong term.

I have a section of about 20k US public schools. I (stupidly) forgot to add a "type" select box (public or private) before I imported the public schools. Is there any way to do a one-shot massive bulk operation ("With selected..." > Set Type > Public) on all existing entries?

I'll happily dive into the SQL; I'm just not comfortable enough with the schema to risk constructing a query on my own.

Thanks!

I lied. INSERT INTO sym_entries_data_28 (entry_id, handle, value) SELECT school.entry_id, "public", "Public" FROM sym_entries_data_5 AS school did the trick.

I'd be interested to hear if there's a better way, though.

Nope, the direct SQL query is by far the fastest way to do this. There is the Resave Entries extension too that can be helpful if there are multiple/complex fields.

You must have read my mind. I was just about to write some nasty SQL to update the handles of a few thousand text inputs. That extension'll do the job nicely.

Thanks, brendo!

Edit: Actually, considering "Public" was the new default for the select box, resaving the entries via that extension would probably have worked too :)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details