DB Error: ERROR: syntax error at or near ")" LINE 28: j.journal_id = $7 AND () ^