+ function field_exists($table_name, $field_name){
+ if(!$this->link) $this->connect($this->host, $this->base, $this->user, $this->password);
+ $sql = "SHOW COLUMNS FROM `".$table_name."` LIKE ".$field_name;
+ $rst = $this->query($sql);
+ $exists = false;
+ $v_rst = $this->fetch_assoc($rst);
+ if($v_rst) $exists = true;
+ $this->free_result($rst);
+ return $exists;
+ }
+