function update($table,$array,$where=null){
foreach($array as $key=>$val){
if($str==null){
$sep="";
}else{
$sep=",";
}
$str.=$sep.$key."='".$val."'";
}
$sql="update {$table} set {$str} ".($where==null?null:"where".$where);
mysql_query($sql);
return mysql_affected_rows();
}Notice: Undefined variable: str in D:\phpnow\vhosts\127.0.0.39\lib\mysql.func.php on line 27Notice: Undefined variable: str in D:\phpnow\vhosts\127.0.0.39\lib\mysql.func.php on line 32编辑成功!查看管理员列表
- 2 回答
- 0 关注
- 1323 浏览
添加回答
举报
0/150
提交
取消