无详细内容 无 //获取当前表中的所有字段public function _facade($post){$data = array();$arr=array();$sql = 'select * from '.$this-table;$res = $this-db-ftable($sql);for($i=0;$imysql_num_fields($res);$i++){$m = mysql_fetch_field($res);$m = $m-
//获取当前表中的所有字段 public function _facade($post){ $data = array(); $arr=array(); $sql = 'select * from '.$this->table; $res = $this->db->ftable($sql); for($i=0;$i<mysql_num_fields($res);$i++){ $m = mysql_fetch_field($res); $m = $m->name; if(!in_array($m,$arr)){ array_push($arr,$m); } } foreach($post as $k=>$v){ if(in_array($k,$arr)){//判断$K是否为数组的字段,如果不是追加 $data[$k]=$v; } } return $data; }