mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-24 18:40:13 +01:00
pilerexport fix
This commit is contained in:
parent
b0e4debb12
commit
d603f29feb
@ -343,6 +343,8 @@ int main(int argc, char **argv){
|
||||
if(where_condition) rc = append_string_to_buffer(&query, " AND ");
|
||||
snprintf(s, sizeof(s)-1, " `size` >= %d", minsize);
|
||||
rc += append_string_to_buffer(&query, s);
|
||||
|
||||
where_condition++;
|
||||
}
|
||||
|
||||
|
||||
@ -350,6 +352,8 @@ int main(int argc, char **argv){
|
||||
if(where_condition) rc = append_string_to_buffer(&query, " AND ");
|
||||
snprintf(s, sizeof(s)-1, " `size` <= %d", maxsize);
|
||||
rc += append_string_to_buffer(&query, s);
|
||||
|
||||
where_condition++;
|
||||
}
|
||||
|
||||
|
||||
@ -357,6 +361,8 @@ int main(int argc, char **argv){
|
||||
if(where_condition) rc = append_string_to_buffer(&query, " AND ");
|
||||
snprintf(s, sizeof(s)-1, " `sent` >= %ld", startdate);
|
||||
rc += append_string_to_buffer(&query, s);
|
||||
|
||||
where_condition++;
|
||||
}
|
||||
|
||||
|
||||
@ -364,6 +370,8 @@ int main(int argc, char **argv){
|
||||
if(where_condition) rc = append_string_to_buffer(&query, " AND ");
|
||||
snprintf(s, sizeof(s)-1, " `sent` <= %ld", stopdate);
|
||||
rc += append_string_to_buffer(&query, s);
|
||||
|
||||
where_condition++;
|
||||
}
|
||||
|
||||
|
||||
|
@ -64,7 +64,7 @@ create index `rcpt_idx2` on `rcpt`(`to`);
|
||||
|
||||
|
||||
drop view if exists `messages`;
|
||||
create view `messages` AS select `metadata`.`id` AS `id`,`metadata`.`piler_id` AS `piler_id`,`metadata`.`from` AS `from`,`rcpt`.`to` AS `to`,`metadata`.`subject` AS `subject`, `metadata`.`size` AS `size`, `metadata`.`direction` AS `direction`, `metadata`.`arrived` AS `arrived`, `metadata`.`digest` AS `digest`, `metadata`.`bodydigest` AS `bodydigest` from (`metadata` join `rcpt`) where (`metadata`.`id` = `rcpt`.`id`);
|
||||
create view `messages` AS select `metadata`.`id` AS `id`,`metadata`.`piler_id` AS `piler_id`,`metadata`.`from` AS `from`,`rcpt`.`to` AS `to`,`metadata`.`subject` AS `subject`, `metadata`.`size` AS `size`, `metadata`.`direction` AS `direction`, `metadata`.`sent` AS `sent`, `metadata`.`digest` AS `digest`, `metadata`.`bodydigest` AS `bodydigest` from (`metadata` join `rcpt`) where (`metadata`.`id` = `rcpt`.`id`);
|
||||
|
||||
|
||||
drop table if exists `attachment`;
|
||||
|
Loading…
Reference in New Issue
Block a user