public ArrayList create(HashMap record){
		ArrayList records = new ArrayList();
		//Map<String, Object> map = parse_request(s);
		String sql = "INSERT INTO " + table;
		ArrayList columns = new ArrayList();
		ArrayList values = new ArrayList();
		
		Date date = new Date();
		DateFormat date_format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		
		Iterator it = record.entrySet().iterator();
	    while (it.hasNext()) {
	    	Map.Entry pairs = (Map.Entry)it.next();
	    	String value = (String) pairs.getValue();
	    	if (value != null){
		    	String key = (String) pairs.getKey();
		    	if(table.equals("users") && key.equals("password")){
					value = encrypt_password(value, date, date_format);
				}
				columns.add(key);
				if(value == null) value = "";
				values.add("'" + value.toString().replaceAll("'","''") + "'");
	    	}
	        it.remove(); 
	    }
		
		if(table.equals("users") && !columns.contains("active")){
			columns.add("active");
			values.add("1");
		}
		
		columns.add("created_at");
		columns.add("updated_at");
		values.add("'" + date_format.format(date).toString() + "'");
		values.add("'" + date_format.format(date).toString() + "'");

		String s_columns = columns.toString();
		String s_values = values.toString();
		s_columns = s_columns.replace("[", "(").replace("]", ")");
		s_values = s_values.replace("[", "(").replace("]", ")");
		sql = sql + " " + s_columns + " VALUES " + s_values + ";";
		Statement stmt;
		try {
			Connection conn = connect();
			stmt = conn.createStatement();
			stmt.executeUpdate(sql);
			String sql_last_insert = "SELECT * FROM " + table + " ORDER BY id DESC LIMIT 1";
			records = fetch_records(sql_last_insert);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return records;
	}