I created a table with this statement:

PHP Code:
QSqlQuery query;
query.exec("CREATE TABLE IF NOT EXISTS teeee(teeee_id INT, distance INTEGER, type TEXT, PRIMARY KEY (teeee_id))"); 
And then I inserted three records like this:

PHP Code:
qresult q.exec("INSERT INTO teeee (teeee_id, distance, type), VALUES (123, 332, 'type1')"); 
The query.lastError() gave me this error message:
constraint failed unable to fetch row

However, I can still select the data successfully, but I have no idea how to remove this error.

haining