3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-23 04:19:27 +01:00

Add missing parentheses to recently added SQL statements

This commit is contained in:
Pragmatic Software 2016-12-01 05:18:56 -08:00
parent af02bc43d3
commit ba7149f518

View File

@ -812,7 +812,7 @@ sub get_recent_messages {
$or = ' OR ';
}
$sql .= "$ids AND channel = ? $mode_query ORDER BY timestamp ASC LIMIT ? OFFSET (SELECT COUNT(*) FROM Messages WHERE $ids AND channel = ? $mode_query) - ?";
$sql .= "($ids) AND channel = ? $mode_query ORDER BY timestamp ASC LIMIT ? OFFSET (SELECT COUNT(*) FROM Messages WHERE ($ids) AND channel = ? $mode_query) - ?";
my $sth = $self->{dbh}->prepare($sql);
my $param = 1;
@ -1051,7 +1051,7 @@ sub get_max_messages {
$or = ' OR ';
}
$sql .= $ids;
$sql .= "($ids)";
my $sth = $self->{dbh}->prepare($sql);
my $param = 1;