就是说把“$strSql2="UPDATE DhcpStatic SET idx='$i',macAddress='$arr[$i]',ipAddress='$brr[$i]' where deviceId='55'";” 改成“$strSql2="UPDATE DhcpStatic SET idx='$i',macAddress='{$arr[$i]}',ipAddress='{$brr[$i]}' where deviceId='55'";”对吗?我试过了,还是不行啊,郁闷中,字段名都没有错误
第一输出sql,到phpMyadmin里运行一下,看错在哪里 第二,养成好习惯,这样写: $sql = sprintf("update DhcpStatic SET idx= '%s' where id = '%s'",$idx,$id); 很容易搞定的,呵呵
第二,养成好习惯,这样写:
$sql = sprintf("update DhcpStatic SET idx= '%s' where id = '%s'",$idx,$id);
很容易搞定的,呵呵