mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +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:
committed by
Rusty Russell
parent
8d3861ee29
commit
b9c602c7e4
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user