From 9212ac2e14c788abc3d585f12888df501d45686a Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" <> Date: Fri, 14 Jan 2005 17:49:45 +0000 Subject: Bug 276237 Charting is completely broken - can't add datasets to list patch by Nick.Barnes@pobox.com r=mkanat r=justdave a=justdave --- checksetup.pl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'checksetup.pl') diff --git a/checksetup.pl b/checksetup.pl index 865c22a43..bf193497a 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -3992,11 +3992,15 @@ if (TableExists("user_series_map")) { RenameField('series_categories', 'category_id', 'id'); AddField("series", "public", "tinyint(1) not null default 0"); - + # Migrate public-ness across from user_series_map to new field - $dbh->do("UPDATE series SET series.public = 1 " . - "WHERE series.series_id = user_series_map.series_id " . - " AND user_series_map.user_id = 0"); + $sth = $dbh->prepare("SELECT series_id from user_series_map " . + "WHERE user_id = 0"); + $sth->execute(); + while (my ($public_series_id) = $sth->fetchrow_array()) { + $dbh->do("UPDATE series SET public = 1 " . + "WHERE series_id = $public_series_id"); + } $dbh->do("DROP TABLE user_series_map"); } -- cgit v1.2.3-24-g4f1b