function insert($table, $data)
{
$sql = "INSERT INTO `" . $table . "` SET ";
$values = array();
foreach ($data as $key => $value) {
$values[] = "`" . $key . "`='" . $value . "'";
}
$sql .= implode(",", $values);
$this->db_rs = $this->query($sql);
if (!$this->db_rs) {
return false;
}
return $this->insert_id();
}