See below code snippet, I wonder what the colons (':') in the SQLite statements mean. I studied at SQLite tutorials but can't figure it out.
The colons are among
sqlite3_prepare_v2
,
sqlite3_bind_int64
and
sqlite3_prepare_v2
statements of the below snippet.
iRet = sqlite3_prepare_v2(pDB, "SELECT " SZ_KEY_PATH" FROM
"SZ_KEY_REPORT" " "WHERE " SZ_KEY_STARTTIME "< :" SZ_KEY_NAME ,
-1, &pStmt, NULL);
if (SQLITE_OK == iRet)
{
sqlite3_bind_int64(pStmt, sqlite3_bind_parameter_index(pStmt, ":" SZ_KEY_NAME), LocalTime - 86400 * iDelDay);
while (SQLITE_ROW == (iRet = sqlite3_step(pStmt)))
{
const unsigned char* ReportPath = sqlite3_column_text(pStmt, 0);
if (0 != (iRet = remove((const char*)ReportPath)))
{
goto exit_clamav_schedule;
}
}
sqlite3_finalize(pStmt);
if(SQLITE_DONE != iRet)
{
goto exit_clamav_schedule;
}
}
iRet = sqlite3_prepare_v2(pDB, "DELETE FROM " SZ_KEY_REPORT" "
"WHERE " SZ_KEY_STARTTIME" < :" SZ_KEY_NAME ,
-1, &pStmt, NULL);
The 'SZ_KEY_NAME' appearing in above snippet is defined as 'name' some other place of the program.
What I have tried:
I studied at SQLite tutorials in the web and discussed with my coworker but in vain.