1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
|
** timestamp. Returns 0 if there is no such item and -1 if the details
** are ambiguous and could refer to multiple items.
*/
int wiki_technote_to_rid(const char *zETime) {
int rid=0; /* Artifact ID of the tech note */
int nETime = strlen(zETime);
Stmt q;
if( nETime>=4 && nETime<=UUID_SIZE && validate16(zETime, nETime) ){
char zUuid[UUID_SIZE+1];
memcpy(zUuid, zETime, nETime+1);
canonical16(zUuid, nETime);
db_prepare(&q,
"SELECT e.objid"
" FROM event e, tag t"
" WHERE e.type='e' AND e.tagid IS NOT NULL AND t.tagid=e.tagid"
" AND t.tagname GLOB 'event-%q*'",
|
|
|
|
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
|
** timestamp. Returns 0 if there is no such item and -1 if the details
** are ambiguous and could refer to multiple items.
*/
int wiki_technote_to_rid(const char *zETime) {
int rid=0; /* Artifact ID of the tech note */
int nETime = strlen(zETime);
Stmt q;
if( nETime>=4 && hname_validate(zETime, nETime)!=HNAME_NONE ){
char zUuid[HNAME_LEN_MAX+1];
memcpy(zUuid, zETime, nETime+1);
canonical16(zUuid, nETime);
db_prepare(&q,
"SELECT e.objid"
" FROM event e, tag t"
" WHERE e.type='e' AND e.tagid IS NOT NULL AND t.tagid=e.tagid"
" AND t.tagname GLOB 'event-%q*'",
|