Hello !
I'm trying to have a very little db. My knowledges in db are poor but I just want to know how can I set a minimal db i.e. :
MAIN_TREE
entry1
...(1->L)
entryL
SUB_TREE1
entry1
...(1->I)
entryI
SUB_TREE...(1->N)
entry1
...(1->J)
entryJ
SUB_TREEN
entry1
...(1->K)
entryK
MAIN_TREE
entry1
...(1->L)
entryL
SUB_TREE1
entry1
...(1->I)
entryI
SUB_TREE...(1->N)
entry1
...(1->J)
entryJ
SUB_TREEN
entry1
...(1->K)
entryK
To copy to clipboard, switch view to plain text mode
The entries will just be a list of files (and their path).
I'm really noob because my very little code doesn't work :
.h file:
QSqlQuery *query;
To copy to clipboard, switch view to plain text mode
.cpp file:
bool tst = query->exec("CREATE TABLE person");
[post edit :] query = new QSqlQuery(db);
bool tst = query->exec("CREATE TABLE person");
To copy to clipboard, switch view to plain text mode
=> lol. I have a segfault... edit : The segfault is gone but... there isn't any table in the file which is correctly created. The result of the query is "false". But I wonder why... it seems to be a basic query...
Bookmarks