如何打印在这样的代码部分中执行的实际最终sqlite3查询?
int rc;
sqlite3_stmt *res;
char *query = "";
query = "SELECT count(*) FROM `db_report` WHERE `r_sn` = ?;";
rc = sqlite3_prepare_v2(db, query, -1, &res, 0);
if (rc == SQLITE_OK)
{
sqlite3_bind_text(res, 1, sn, strlen(sn), SQLITE_STATIC);
}
int step = sqlite3_step(res);
PRINT REAL QUERY
sqlite3_finalize(res);
return 0;
非常感谢:)