Verfasst: 26.05.2008 07:35
Hat wirklich Niemand eine Lösung für mich? 

phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
So scheints dann wohl zu sein.gn#36 hat geschrieben:Ich vermute mal dass das eine Art Folgefehler ist und die bbCode UID im Tag nicht mehr mit der im extra Feld gespeicherten übereinstimmt. Dadurch werden diese nicht mehr geparst und daher so wie sie sind dargestellt. Da die sich außerdem in allen Postings unterscheiden könnte es schwierig werden da was gegen zu tun...
Code: Alles auswählen
<?
#########################################################################
#########################################################################
## ##
## Script coded by Eric Reiche ##
## ##
## Version: 0.2 / 2006-08-16 17:35 GMT + 100 ##
## Version 0.2 contains bugfixes ##
## ##
## Inspired by serversupportforum.de user monotek ##
## ( http://www.serversupportforum.de/forum/sql/ \ ##
## 9279-kollation-von-tabellen-aendern.html#post67293 ) ##
## [Check link for bashscript] ##
## ##
## Web: http://www.ericreiche.net || Mail: webmaster@ericreiche.net ##
## ##
## You can spread this script, until you don't touch this copymark ##
## ##
#########################################################################
#########################################################################
//Config:
$mysqlserver = 'localhost'; //Host
$mysqluser = 'xyz'; //User [It's recomment to use root]
$mysqlpw = 'xyz'; //Password
$mysqldb = 'xyz'; //Database
$stepping = 100; //Queries per Page
$tabletoskip = ''; //If you have a really big table, you can enter it here,
//it will be skipped, to prevent a script abort
$collation = 'utf8_unicode_ci';
$character_set = 'utf8';
//End Config
#######################################################################
# Do not change anything from here, until you know what you're doing #
#######################################################################
if(isset($_GET['start']) && is_numeric($_GET['start'])){
$start = $_GET['start'];
if($start > 0){
$start = $start * $stepping;
}
}else{
$start = 0;
}
//mysql connect
@mysql_connect($mysqlserver, $mysqluser, $mysqlpw) OR die("No Conncection to Server. Report: :".mysql_error());
mysql_select_db($mysqldb) OR die("couldn't select database, Report: ".mysql_error());
unset($mysqlserver);
unset($mysqluser);
unset($mysqlpw);
$i = 0;
print('<pre>');
if($start == 0){
$sql = 'ALTER DATABASE '.$mysqldb.' DEFAULT CHARACTER SET '.$character_set.' COLLATE '.$collation.";\r\n";
mysql_query($sql);
print($sql);
}
$sql = 'Show tables;';
$result1 = mysql_query($sql);
while($tables = mysql_fetch_assoc($result1)){
if($start == 0){
$sql = 'ALTER TABLE '.$tables['Tables_in_'.$mysqldb].' DEFAULT CHARACTER SET '.$character_set.' COLLATE '.$collation.";\r\n";
mysql_query($sql);
print(' '.$sql);
}
$sql = 'Show columns FROM '.$tables['Tables_in_'.$mysqldb];
$result2 = mysql_query($sql);
while($columns = mysql_fetch_assoc($result2)){
if(substr_count($columns['Type'], 'varchar') || substr_count($columns['Type'], 'text')){
$i++;
if($i >= $start && $i < ($start + $stepping)){
$sql = 'ALTER TABLE '.$tables['Tables_in_'.$mysqldb].' CHANGE '.$columns['Field'].' '.$columns['Field'].' '.$columns['Type'].' CHARACTER SET '.$character_set.' COLLATE '.$collation.';';
if($tabletoskip != $tables['Tables_in_'.$mysqldb]){
mysql_query($sql);
print(' '.$i.'. '.$sql."\r\n");
}else{
print(' '.$i.'. <b>SKIPPED</b>: '.$sql."\r\n");
}
}
}
}
}
print('</pre>');
print('<a href="'.$_SERVER['PHP_SELF'].'?start='.($_GET['start'] + 1).'">Weiter...</a>');
?>
Mahony hat geschrieben:Schau mal in die Datenbank unter phpbb_posts in der Spalte bbcode_uid nach welchen Wert varchar hat.
varchar sollte den Wert 8 haben - falls nicht, dann ändere das mal.