Skip to content

Commit 3ba769f

Browse files
committed
Also get default values after adding row to table with keyword as name
Fix SELECT statement to retrieve default values after inserting a new row into a table with a keyword as table name.
1 parent 35a68b0 commit 3ba769f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sqlitedb.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ bool DBBrowserDB::executeMultiSQL(const QString& statement, bool dirty, bool log
523523

524524
bool DBBrowserDB::getRow(const QString& sTableName, int rowid, QList<QByteArray>& rowdata)
525525
{
526-
QString sQuery = QString("SELECT * from %1 WHERE `%2`=%3;").arg(sTableName).arg(getObjectByName(sTableName).table.rowidColumn()).arg(rowid);
526+
QString sQuery = QString("SELECT * FROM `%1` WHERE `%2`=%3;").arg(sTableName).arg(getObjectByName(sTableName).table.rowidColumn()).arg(rowid);
527527
QByteArray utf8Query = sQuery.toUtf8();
528528
sqlite3_stmt *stmt;
529529
bool ret = false;

0 commit comments

Comments
 (0)