DannyCarlton.net Feedback Forums | register | login
phpBible.org

    Return to Page 4
re: Possible solution in response from hosting provider
Jul. 7th, 2004   1:53pm

That wouldn’t work since the variable that is changed is tossed. changing

for($i=0;$i<=31117;$i++)
  {
  $row=$i+1;
  $av_text[$i]=str_replace("\n", ’’, $av_text[$i]);
  $av_text[$i]=str_replace("\r", ’’, $av_text[$i]);
  $av_text[$i]=str_replace(’INTO bible VALUES (’, "INTO $table_name VALUES ( ’$row’, ", $av_text[$i]);
  if($av_text[$i]){$result = mysql_query($av_text[$i]) or die("Query failed ($i) : " . mysql_error());}
  }

to

for($i=0;$i<=31117;$i++)
  {
  $row=$i+1;
  $temp=$av_text[$i];
  $temp=str_replace("\n", ’’, $temp);
  $temp=str_replace("\r", ’’, $temp);
  $temp=str_replace(’INTO bible VALUES (’, "INTO $table_name VALUES ( ’$row’, ", $temp);
  if($temp){$result = mysql_query($temp) or die("Query failed ($i) : " . mysql_error());}
  }

would work however. But you would also need to change

for($i=31118;$i<=31184;$i++)
  {
  $av_text[$i]=str_replace("\n", ’’, $av_text[$i]);
  $av_text[$i]=str_replace("\r", ’’, $av_text[$i]);
  $av_text[$i]=str_replace(’INTO books VALUES’, "INTO $table_name VALUES", $av_text[$i]);
  if($av_text[$i]){$result = mysql_query($av_text[$i]) or die("Query failed ($i) : " . mysql_error());}
  }

to

for($i=31118;$i<=31184;$i++)
  {
  $temp=$av_text[$i];
  $temp=str_replace("\n", ’’, $temp);
  $temp=str_replace("\r", ’’, $temp);
  $temp=str_replace(’INTO books VALUES’, "INTO $table_name VALUES", $temp);
  if($temp){$result = mysql_query($temp) or die("Query failed ($i) : " . mysql_error());}
  }

I made the changes on my script and ran it on my local server, and while I have no way of checking memory usage, it did load the DB like it is supposed to.

I’ll add these changes to the next upgrade. Thanks for the tip.

Danny Carlton (68.0.75.150)


    Return to Page 4
This Thread

Post a Message
Name:

Subject:

Message:


page processed in 0.00195908546448 seconds
Return to DannyCarlton.net main page