Revision 0cf8a848
Von Bernd Bleßmann vor etwa 2 Monaten hinzugefügt
SL/AR.pm | ||
---|---|---|
626 | 626 |
} |
627 | 627 |
if ($form->{"project_id"}) { |
628 | 628 |
$where .= |
629 |
qq|AND ((a.globalproject_id = ?) OR EXISTS | . |
|
629 |
qq| AND ((a.globalproject_id = ?) OR EXISTS | .
|
|
630 | 630 |
qq| (SELECT * FROM invoice i | . |
631 | 631 |
qq| WHERE i.project_id = ? AND i.trans_id = a.id) | . |
632 | 632 |
qq| OR EXISTS | . |
SL/OE.pm | ||
---|---|---|
196 | 196 |
|
197 | 197 |
if ($form->{"project_id"}) { |
198 | 198 |
$query .= |
199 |
qq|AND ((globalproject_id = ?) OR EXISTS | . |
|
199 |
qq| AND ((globalproject_id = ?) OR EXISTS | .
|
|
200 | 200 |
qq| (SELECT * FROM orderitems oi | . |
201 | 201 |
qq| WHERE oi.project_id = ? AND oi.trans_id = o.id))|; |
202 | 202 |
push(@values, conv_i($form->{"project_id"}), conv_i($form->{"project_id"})); |
SL/VK.pm | ||
---|---|---|
163 | 163 |
} |
164 | 164 |
if ($form->{project_id}) { |
165 | 165 |
$where .= |
166 |
qq|AND ((ar.globalproject_id = ?) OR EXISTS | . |
|
166 |
qq| AND ((ar.globalproject_id = ?) OR EXISTS | .
|
|
167 | 167 |
qq| (SELECT * FROM invoice i | . |
168 | 168 |
qq| WHERE i.project_id = ? AND i.trans_id = ar.id))|; |
169 | 169 |
push(@values, $form->{"project_id"}, $form->{"project_id"}); |
... | ... | |
202 | 202 |
} |
203 | 203 |
|
204 | 204 |
1; |
205 |
|
Auch abrufbar als: Unified diff
Berichte Angebote/Aufträge,Rechnungen,VK: Leerzeichen in SQL-Abfrage
Ab psql Version 15 oder 16 gibt es einen Fehler, wenn sowas abgfragt
wird: SELECT * FROM oe WHERE 1 = 1AND ...;
(ERROR: trailing junk after numeric literal at or near "1A")
Das passierte in älteren Versionen nicht, deshalb sind die
fehlenden Leerzeiche wohl nie aufgefallen.