mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 06:41:44 +01:00
db: Fix a syntax error with the optional parameters
SQL doesn't really allow `a OR 1` as a clause since `1` is not a boolean expression. Moving it into `a OR 1=1` however is valid again.
This commit is contained in:
parent
8d3861ee29
commit
b9c602c7e4
1 changed files with 3 additions and 1 deletions
|
@ -3371,7 +3371,9 @@ wallet_payment_list(const tal_t *ctx,
|
|||
", partid"
|
||||
", local_offer_id"
|
||||
" FROM payments"
|
||||
" WHERE (payment_hash = ? OR ?) AND (status = ? OR ?)"
|
||||
" WHERE"
|
||||
" (payment_hash = ? OR 1=?) AND"
|
||||
" (status = ? OR 1=?)"
|
||||
" ORDER BY id;"));
|
||||
|
||||
if (payment_hash)
|
||||
|
|
Loading…
Add table
Reference in a new issue