[cvs] [Wiki] changed: DatabaseCleanup

Wiki Guest wikiguest at horde.org
Mon Jan 12 16:34:33 UTC 2009


guest [193.50.125.9]  Mon, 12 Jan 2009 11:34:33 -0500

Modified page: http://wiki.horde.org/DatabaseCleanup
New Revision:  1.4
Change log:  Correction of the script

@@ -46,9 +46,9 @@
     $valides[$value]=1;
  }
  // Looking at prefs to get most of old user data
  $db->setOption('portability', DB_PORTABILITY_LOWERCASE |  
DB_PORTABILITY_ERRORS);
-$result = $db->query('SELECT pref_uid FROM horde_prefs WHERE pref_uid  
like \'%\'');
+$result = $db->query('SELECT pref_uid FROM horde_prefs WHERE 1');
  if (is_a($result, 'PEAR_Error')) {
     $cli->message($result->toString(), 'cli.error');
     exit;
  }
@@ -59,8 +59,9 @@
      $uid[$login] = $login;
  }
  $total=count($uid);
  echo "$total data user found\n";
+echo "Exit without removing data, change the script please\n";
  exit; # Drop this line if you want to remove data

  //now compare valid and data found and purge
  foreach ($uid as $value) {



More information about the cvs mailing list