GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add 'x rows affected' part to the Execute Query results · Processoriented/sqlitebrowser@82292c2

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • MainWindow.cpp
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/MainWindow.cpp‎

Copy file name to clipboardExpand all lines: src/MainWindow.cpp
+10-1Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,16 @@ void MainWindow::executeQuery()
826826
if( !queryPart.trimmed().startsWith("SELECT", Qt::CaseInsensitive) )
827827
{
828828
modified = true;
829-
statusMessage = tr("Query executed successfully: %1 (took %2ms)").arg(queryPart.trimmed()).arg(timer.elapsed());
829+
830+
QString stmtHasChangedDatabase;
831+
if(queryPart.trimmed().startsWith("INSERT", Qt::CaseInsensitive) ||
832+
queryPart.trimmed().startsWith("UPDATE", Qt::CaseInsensitive) ||
833+
queryPart.trimmed().startsWith("DELETE", Qt::CaseInsensitive))
834+
{
835+
stmtHasChangedDatabase = tr(", %1 rows affected").arg(sqlite3_changes(db._db));
836+
}
837+
838+
statusMessage = tr("Query executed successfully: %1 (took %2ms%3)").arg(queryPart.trimmed()).arg(timer.elapsed()).arg(stmtHasChangedDatabase);
830839
}
831840
break;
832841
}

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.