|
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
|