commit c97633adb8bdfc6f6f2d574e2ada7127c7ba949d
parent ddf846daac790f2dcac0f62d568a38eee2505eb3
Author: Christian Grothoff <christian@grothoff.org>
Date: Fri, 26 Jul 2024 15:44:30 +0200
-fix SQL bugs
Diffstat:
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/exchangedb/pg_lookup_aml_history.c b/src/exchangedb/pg_lookup_aml_history.c
@@ -141,17 +141,17 @@ TEH_PG_lookup_aml_history (
PREPARE (pg,
"lookup_aml_history",
"SELECT"
- " ah.decision_time"
+ " lo.decision_time"
",ah.justification"
",ah.decider_pub"
",lo.jproperties"
",lo.jnew_rules"
",lo.to_investigate"
- ".lo.is_active"
+ ",lo.is_active"
" FROM aml_history ah"
" JOIN legitimization_outcomes lo"
" USING (outcome_serial_id)"
- " WHERE h_payto=$1"
+ " WHERE ah.h_payto=$1"
" ORDER BY decision_time DESC;");
qs = GNUNET_PQ_eval_prepared_multi_select (
pg->conn,
diff --git a/src/exchangedb/pg_lookup_kyc_history.c b/src/exchangedb/pg_lookup_kyc_history.c
@@ -174,9 +174,9 @@ TEH_PG_lookup_kyc_history (
",ka.encrypted_attributes"
" FROM kyc_attributes ka"
" JOIN legitimization_processes lp"
- " ON (ka.legitimization_serial = lp.legitimization_process_serial)"
+ " ON (ka.legitimization_serial = lp.legitimization_process_serial_id)"
" WHERE ka.h_payto=$1"
- " ORDER BY collection_time DESC;");
+ " ORDER BY ka.collection_time DESC;");
qs = GNUNET_PQ_eval_prepared_multi_select (
pg->conn,