|
Posted by MKruer on 12/22/07 17:04
I am having issues with a while loop in a modified script. It gives me
the error "Fatal error: Cannot access empty property in fb2phpbb2.php
on line 146" If i comment out the loop. The script does populate the
table. Because the script was designed for php 4.x, I think its just a
syntactical issue. More info can be found at
http://www.phpbb.com/community/viewtopic.php?f=10&t=588149&p=3563595#p3563595
-TIA-
[Code]
while ( $row = mysql_fetch_object( $result ) ) {
// remove extra slashes
$subject = stripslashes( $row->subject );
// Some messages still had the single quote in them without a \
// which was causing import problems so we
// removed the single quote and replaced it with HTML for the
quote
$subject = preg_replace ('/\'/', '\\\'', $subject);
$query="INSERT INTO {$phpbb_dbprefix}topics"
." (topic_id, forum_id, topic_poster, topic_title, topic_time,"
." topic_views, topic_replies, topic_status, topic_vote,
topic_type,"
." topic_first_post_id, topic_last_post_id, topic_moved_id)"
." VALUES ('$row->id', '$row->catid', '$row->userid',
'$subject', '$row->time',"
." '$row->hits', '$row->reply', '$row->locked', '0', '',"
." '$row->min', '$row->max', '0')";
$updateresult = mysql_query($query) or die("<br />Invalid
query:<br />$query<br />" . mysql_error());
}
mysql_free_result($result);
[/Code]
[Back to original message]
|