FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » I have moved a Forum to a new server and everything works except...
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: I have moved a Forum to a new server and everything works except... [message #36919 is a reply to message #36911] Tue, 17 April 2007 15:37 Go to previous messageGo to previous message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma:
Senior Member
<?php

$db = mysql_connect("localhost", "USERNAME", "PASSWORD");
mysql_select_db("DATABASENAME",$db);

$sql = "SELECT * FROM fud26_attach WHERE location LIKE '%/OLD/PATH/TO/FILES/%'";
$result = mysql_query($sql,$db);


while($row = mysql_fetch_array($result))
{
 $tmp = $row['location'];
 $tmp = str_replace('/OLD/PATH/TO/FILES/','/NEW/PATH/',$tmp);
 $sql = "UPDATE fud26_attach SET location='".$tmp."' WHERE id='".$row['id']."'";
 mysql_query($sql,$db);
}
?>


[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: FreeBSD / PHP 5 / MySQL 5
Next Topic: Can't access Menu items after Forum Migration
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 20:47:56 GMT 2024

Total time taken to generate the page: 0.03970 seconds