123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
/*
** Poll db for current exe-status of a file.
*/
static int test_isexe(const char *zFilename, int vid){
static Stmt s;
int isexe;
db_static_prepare(&s,
"UPDATE vfile SET isexe=:isexe"
" WHERE vid=:vid AND pathname=:path AND isexe!=:isexe"
);
db_bind_int(&s, ":vid", vid);
db_bind_text(&s, ":path", zFilename);
db_step(&s);
isexe = db_column_int(&s, 0);
db_reset(&s);
|
|
|
|
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
/*
** Poll db for current exe-status of a file.
*/
static int test_isexe(const char *zFilename, int vid){
static Stmt s;
int isexe;
db_static_prepare(&s,
"SELECT isexe"
" FROM vfile where vid=:vid AND pathname=:path"
);
db_bind_int(&s, ":vid", vid);
db_bind_text(&s, ":path", zFilename);
db_step(&s);
isexe = db_column_int(&s, 0);
db_reset(&s);
|