summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fc2f81b)
BUGfix für substr($where, 0, 4, " WHERE "):
$where muss am Anfang innerhalb 4 Zeichen das AND stehen haben,
sonst kommt es zu einem SQL Syntaxerror
}
if ($form->{project_id}) {
$where .=
}
if ($form->{project_id}) {
$where .=
- qq|AND ((a.globalproject_id = ?) OR EXISTS | .
+ qq| AND ((a.globalproject_id = ?) OR EXISTS | .
qq| (SELECT * FROM invoice i | .
qq| WHERE i.project_id = ? AND i.trans_id = a.id) | .
qq| OR EXISTS | .
qq| (SELECT * FROM invoice i | .
qq| WHERE i.project_id = ? AND i.trans_id = a.id) | .
qq| OR EXISTS | .
if ($form->{parts_partnumber}) {
$where .= <<SQL;
if ($form->{parts_partnumber}) {
$where .= <<SQL;
SELECT invoice.trans_id
FROM invoice
LEFT JOIN parts ON (invoice.parts_id = parts.id)
SELECT invoice.trans_id
FROM invoice
LEFT JOIN parts ON (invoice.parts_id = parts.id)
if ($form->{parts_description}) {
$where .= <<SQL;
if ($form->{parts_description}) {
$where .= <<SQL;
SELECT invoice.trans_id
FROM invoice
WHERE (invoice.trans_id = a.id)
SELECT invoice.trans_id
FROM invoice
WHERE (invoice.trans_id = a.id)