把while(list($photoname) = mysql_fetch_array($Rst))这一句改成while(list($photoname) = each(mysql_fetch_array($Rst)))试一下。

解决方案 »

  1.   

    总数为:10587Warning: Variable passed to each() is not an array or object in /www/users/focusforever.com/edit.php on line 10
    已更新记录:不能执行
      

  2.   

    循环内的update破坏了循环外的select的结果,你可以这样
    <?
    include("inc/global.inc");
    $Server = Get_Mysql_Server();$Str = "update new_photo set photoname=CONCAT('s_0',SUBSTRING(photoname,SUBSTRING_INDEX(photoname,"_",-1),1),'<br>') where photoname=4";
    $Rst = mysql_query($Str) or die(mysql_error()."<br>".$Str);
    ?>