From 92f554e38aaf3c4d280c201d3a6521e519acfb47 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 4 Oct 2007 11:33:33 +0000 Subject: deregister globals to install too git-svn-id: file:///svn/phpbb/trunk@8130 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/develop/search_fill.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'phpBB/develop/search_fill.php') diff --git a/phpBB/develop/search_fill.php b/phpBB/develop/search_fill.php index 6b83b6848b..371c8c74cc 100644 --- a/phpBB/develop/search_fill.php +++ b/phpBB/develop/search_fill.php @@ -1,4 +1,4 @@ -\n\n"; // // Fetch a batch of posts_text entries // -$sql = "SELECT COUNT(*) as total, MAX(post_id) as max_post_id +$sql = "SELECT COUNT(*) as total, MAX(post_id) as max_post_id FROM ". POSTS_TABLE; -if ( !($result = $db->sql_query($sql)) ) +if ( !($result = $db->sql_query($sql)) ) { $error = $db->sql_error(); die("Couldn't get maximum post ID :: " . $sql . " :: " . $error['message']); @@ -77,10 +77,10 @@ for(;$postcounter <= $max_post_id; $postcounter += $batchsize) $batchend = $postcounter + $batchsize; $batchcount++; - $sql = "SELECT * - FROM " . POSTS_TABLE . " - WHERE post_id - BETWEEN $batchstart + $sql = "SELECT * + FROM " . POSTS_TABLE . " + WHERE post_id + BETWEEN $batchstart AND $batchend"; if( !($result = $db->sql_query($sql)) ) { @@ -97,16 +97,16 @@ for(;$postcounter <= $max_post_id; $postcounter += $batchsize) { // $sql = "LOCK TABLES ".POST_TEXT_TABLE." WRITE"; - // $result = $db->sql_query($sql); + // $result = $db->sql_query($sql); print "\n

\nRestart from posting $batchstart
\n"; // For every post in the batch: for($post_nr = 0; $post_nr < $post_rows; $post_nr++ ) - { + { print "."; flush(); - $post_id = $rowset[$post_nr]['post_id']; + $post_id = $rowset[$post_nr]['post_id']; $search->index('post', $rowset[$post_nr]['post_id'], $rowset[$post_nr]['post_text'], $rowset[$post_nr]['post_subject'], $rowset[$post_nr]['poster_id']); } -- cgit v1.2.1