Commit 6589ff3c authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

Do not bind invalid primary key

parent 1d34596e
...@@ -18,7 +18,8 @@ class SqliteTools ...@@ -18,7 +18,8 @@ class SqliteTools
int res = sqlite3_prepare_v2( dbConnection, req, -1, &stmt, NULL ); int res = sqlite3_prepare_v2( dbConnection, req, -1, &stmt, NULL );
if ( res != SQLITE_OK ) if ( res != SQLITE_OK )
return false; return false;
sqlite3_bind_int( stmt, 1, foreignKey ); if ( foreignKey != 0 )
sqlite3_bind_int( stmt, 1, foreignKey );
res = sqlite3_step( stmt ); res = sqlite3_step( stmt );
while ( res == SQLITE_ROW ) while ( res == SQLITE_ROW )
{ {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment