可以试试下面的方法
<?php
$sql= "select abc from a";
$res=mysql_query($sql,$conn);
while($row=mysql_fetch_row($res)){
$str1 = substr($row[0],-1,1);
$str2=substr($row[0],0,2);
$newstr1=$str1+200;
$newstr=$str2.$newstr1;
$sql= "update a set abc='$newstr' where abc='$row[0]'";
mysql_query($sql,$conn); }
?>
<?php
$sql= "select abc from a";
$res=mysql_query($sql,$conn);
while($row=mysql_fetch_row($res)){
$str1 = substr($row[0],-1,1);
$str2=substr($row[0],0,2);
$newstr1=$str1+200;
$newstr=$str2.$newstr1;
$sql= "update a set abc='$newstr' where abc='$row[0]'";
mysql_query($sql,$conn); }
?>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货