public void update(DatabaseTableData data, Class<?> layout, String where, boolean instant) {
        
        if (!this.exists(where)) {
            this.insert(data, layout, true);
            return;
        }
        
		Field[] publicFields = layout.getFields();
		
		String fields = "";
		
		for (Field field : publicFields) {
			try {
				fields += field.getName() + "='" + field.get(data).toString() + "',";
			} 
			catch (Exception e) {}
		}
		
		fields = fields.substring(0, fields.length() - 1);
		
		String updateQuery = "UPDATE `" + m_name + "` SET " + fields + " WHERE " + where;		
		m_database.query(updateQuery, instant);	
	}