[Wiki] changed: DatabaseCleanup

Wiki Guest <[email protected]>
Newsgroups gmane.comp.horde.cvs
Message-ID <[email protected]>
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) {


--
To unsubscribe, mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.