View Single Post
Old 07-16-2004, 10:54 AM  
Due
Confirmed User
 
Due's Avatar
 
Industry Role:
Join Date: Mar 2001
Location: Murrieta, CA
Posts: 3,620
This might be what you are looking for:

$searching="FIND-THIS";
$replace="REPLACE-WITH-THIS";

$res = mysql_query("SELECT * FROM jg_galleries WHERE url LIKE '%$searching%'");
while($row = mysql_fetch_array($res)) {
$surl++;
$my_id[$surl] = $row[id];
$my_thumb[$surl] = $row[url];
}

while($y<$surl){
$y++;
$newurl[$y]=str_replace("$searching", "$replace", $my_thumb[$y]);
$query = mysql_query("UPDATE jg_galleries SET url='$newurl[$y]' WHERE id='$my_id[$y]'") or print mysql_error();
}
__________________
I buy plugs
Skype: Due_Global
/Due
Due is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote