Subversion Repositories OpenInventory

Compare Revisions

Ignore whitespace Rev 128 → Rev 129

/trunk/DBViewer/mymodel.cpp
98,10 → 98,30
 
if (index_of_list == -1) return value;
else {
QString psrentInctance;
psrentInctance = values.at(index_of_list);
QString parentInctance;
QSqlQuery q;
QString sql_str;
bool ok;
parentInctance = values.at(index_of_list);
sql_str = tr("select * from `");
sql_str.append(parentInctance);
sql_str.append(tr("` "));
sql_str.append(tr("where `ID` = "));
sql_str.append(value.toString());
q.prepare(sql_str);
ok = q.exec();
 
if (ok) {
while(q.next()){
QString object_name = q.value(1).toString();
if (!object_name.isEmpty()) return object_name;
 
}
}
int ii;
ii++;
 
 
}
return value;