171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
|
rc = db_step(&s);
db_finalize(&s);
if( rc==SQLITE_ROW ){
/* Another entry that is more recent already exists. Do nothing */
return;
}
db_prepare(&s,
"REPLACE INTO tagxref(tagid,tagtype,srcId,value,mtime,rid)"
" VALUES(%d,%d,%d,%Q,:mtime,%d)",
tagid, tagtype, srcId, zValue, rid
);
db_bind_double(&s, ":mtime", mtime);
db_step(&s);
db_finalize(&s);
if( tagtype==0 ){
zValue = 0;
}
|
|
|
|
|
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
|
rc = db_step(&s);
db_finalize(&s);
if( rc==SQLITE_ROW ){
/* Another entry that is more recent already exists. Do nothing */
return;
}
db_prepare(&s,
"REPLACE INTO tagxref(tagid,tagtype,srcId,origid,value,mtime,rid)"
" VALUES(%d,%d,%d,%d,%Q,:mtime,%d)",
tagid, tagtype, srcId, rid, zValue, rid
);
db_bind_double(&s, ":mtime", mtime);
db_step(&s);
db_finalize(&s);
if( tagtype==0 ){
zValue = 0;
}
|