';
$comment_sql = mysql_query('SELECT id,text FROM comments');
mysql_query('LOCK TABLE comments');
while($inf = mysql_fetch_assoc($comment_sql))
{
echo 'Comment :'. $inf['id'].' -->' ;
var_dump(mysql_query("UPDATE comments SET text_parsed='". mysql_escape_string( format_comment($inf['text']) )."' WHERE id=".$inf['id']));
echo '
';
flush();
}
mysql_query('UNLOCK TABLES');
echo 'starting with posts:
';
$posts_sql = mysql_query('SELECT id,body FROM posts');
mysql_query('LOCK TABLE posts');
while($inf = mysql_fetch_assoc($comment_sql))
{
echo 'Post :'. $inf['id'].' -->' ;
var_dump(mysql_query("UPDATE posts SET body_parsed='". mysql_escape_string( format_comment($inf['body']) )."' WHERE id=".$inf['id']));
echo '
';
flush();
}
mysql_query('UNLOCK TABLES');
echo 'starting with messages:
';
$posts_sql = mysql_query('SELECT id,msg FROM messages');
mysql_query('LOCK TABLE messages');
while($inf = mysql_fetch_assoc($comment_sql))
{
echo 'Post :'. $inf['id'].' -->' ;
var_dump(mysql_query("UPDATE messages SET msg_parsed='". mysql_escape_string( format_comment($inf['msg']) )."' WHERE id=".$inf['id']));
echo '
';
flush();
}
mysql_query('UNLOCK TABLES');
?>