}
# The where really depends on a few options:
- my $where = 'where ';
+ my $where = "where $breTable.id > 0 and ";
# We fill in the where as necessary.
if ($self->{idlist} && @{$self->{idlist}}) {
$where .= "$breTable.id in (" . join(',', @{$self->{idlist}}) . ')';
} elsif ($Marque::config->option_value('since')) {
my $since_str = Marque::Connector::db_date($self->{since_date});
- $where .= "$breTable.edit_date > '$since_str'";
- $where .= " or $breTable.create_date > '$since_str'";
+ $where .= "($breTable.edit_date > '$since_str'";
+ $where .= " or $breTable.create_date > '$since_str')";
} else {
# We want all non-deleted records.
$where .= "$breTable.deleted = 'f'";