hmmm.... nice little tidbit to find.... thanx primedomain....
Maybe I should have searched for "guest to registered" instead of "accidentally deleted user"...
http://www.phpbb.com/phpBB/viewtopic.php?t=115449
Anyways.... I solved the topic thing with:
--- topics_fix.php ---
<?
$dbuser = "root";
$dbpass = "####";
$dbhost = "localhost";
$dbname = "forum";
/* db connection */
function dbcnx() {
global $dbname, $dbuser, $dbpass, $dbhost;
$dbcon = @mysql_connect($dbhost,$dbuser,$dbpass) or die("Houtson....");
mysql_select_db($dbname,$dbcon);
return $dbcon;
}
/* db tables */
$db = array(posts => "phpbb_posts", topics => "phpbb_topics");
dbcnx();
$topics = mysql_query("SELECT * FROM $db[topics]");
while($topic=mysql_fetch_array($topics)) {
$first_post = mysql_query("SELECT * FROM $db[posts] WHERE topic_id = '$topic[topic_id]' ORDER BY post_time LIMIT 1");
while($post=mysql_fetch_array($first_post)) {
mysql_query("UPDATE $db[topics] SET topic_poster='$post[poster_id]' WHERE topic_id='$post[topic_id]'");
}
}
?>
#EOF
For every topic, finds first poster and updates topic_poster with poster_id.