** Run an SQL command and return the single integer result. */
| 21279 | ** Run an SQL command and return the single integer result. |
| 21280 | */ |
| 21281 | static int db_int(sqlite3 *db, const char *zSql){ |
| 21282 | sqlite3_stmt *pStmt; |
| 21283 | int res = 0; |
| 21284 | sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0); |
| 21285 | if( pStmt && sqlite3_step(pStmt)==SQLITE_ROW ){ |
| 21286 | res = sqlite3_column_int(pStmt,0); |
| 21287 | } |
| 21288 | sqlite3_finalize(pStmt); |
| 21289 | return res; |
| 21290 | } |
| 21291 | |
| 21292 | #if defined(SQLITE_SHELL_HAVE_RECOVER) |
| 21293 | /* |
no outgoing calls
no test coverage detected