preg_replace
by webproger on 2020-03-10
$q = "SELECT * FROM Q_brd_thrd_0 WHERE cntnt LIKE '%qindex.info/drctry.php?ctgry=%'";
$c = preg_replace("/qindex\.info\/drctry\.php\?(id=Silla&)?ctgry=/i","qindex.info/d.php?c=",$a['cntnt']);


$q = "SELECT * FROM uri WHERE ui LIKE '%info/e.php%'";
$r = mysql_query($q,$d_id_lnk);
while($a=mysql_fetch_array($r)) {
    echo $a['ui']."<br>";
    $s = preg_replace("/info\/e\.php/i","info/q.php",$a['ui']);
    echo $s."<br>";
    $q = "UPDATE uri SET ui='".$s."' WHERE ix=".$a['ix'];
    echo $q."<br>";
    mysql_query($q,$d_id_lnk);
    echo "<br>";
}