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 27
Notice: Undefined variable: str in D:\phpnow\vhosts\127.0.0.39\lib\mysql.func.php on line 32
编辑成功!查看管理员列表
灬紫羽
eyouflyer