+ attr = GetTree().GetAttributeDescriptorList(level,1);
+
+ name = GetTree().GetLevelDescriptor(level).GetName();
+ std::vector<std::string> values;
+ GetUpLevelNodeId(level, param,search,id);
+ GetAttributes(name, param,search,attr, values);
+ for(it_attr = attr.begin(), it_val = values.begin(); it_attr != attr.end(); it_attr++, it_val++)
+ {
+ i_results[(*it_attr).GetKey()] = (*it_val).c_str();
+ }
+ search = id;
+ param = "ID";
+ level --;
+ }
+ }
+
+
+//=====================================================================
+// get selected attributes from database for a given file
+ void SQLiteTreeHandler::GetAttributes(std::string name, std::string i_id, std::string i_value, tree::LevelDescriptor::AttributeDescriptorListType i_attr, std::vector<std::string> &i_results)
+ {
+ //SELECT t1.ArtistName,CDs.Title FROM Artists t1, CDs WHERE t1.ArtistID=CDs.ArtistID
+ std::stringstream out;
+ std::stringstream results;
+ out<<"SELECT ";
+ tree::LevelDescriptor::AttributeDescriptorListType::iterator it = i_attr.begin();
+ std::string query ="";
+ for(; it != i_attr.end(); it++)
+ {
+ query += (*it).GetKey();
+ query +=" ,";
+ }
+ query = query.substr(0, query.size()-1);
+ out << query;
+ out << "FROM "<<name;
+ out<<" WHERE "<<i_id <<"='"<<i_value<<"'";
+ CppSQLite3Query q;
+ QUERYDB(out.str(),q);
+ while (!q.eof())
+ {