Revision 9b694f8e
Von Bernd Bleßmann vor 3 Monaten hinzugefügt
- ID 9b694f8ee88a227e7dea8e231ac9e95ad8f32e2b
- Vorgänger b4baa620
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 | ||
---|---|---|
192 | 192 |
|
193 | 193 |
if ($form->{"project_id"}) { |
194 | 194 |
$query .= |
195 |
qq|AND ((globalproject_id = ?) OR EXISTS | . |
|
195 |
qq| AND ((globalproject_id = ?) OR EXISTS | .
|
|
196 | 196 |
qq| (SELECT * FROM orderitems oi | . |
197 | 197 |
qq| WHERE oi.project_id = ? AND oi.trans_id = o.id))|; |
198 | 198 |
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.