fixed list

This commit is contained in:
thatscringebro
2025-12-17 19:13:54 -05:00
parent dd6b6f7b2c
commit 2395d72c7e
3 changed files with 9 additions and 5 deletions

View File

@@ -80,7 +80,7 @@ pub fn get_account(con: &Connection, id: i64) -> Account {
pub fn get_account_total(id: i64, con: &Connection) -> f64 {
let mut query = "SELECT SUM(amount) as total FROM Transactions".to_owned();
if id != 0 {
query.push_str("WHERE account_id = ?")
query.push_str(" WHERE account_id = ?")
}
let mut statement = con.prepare(query).unwrap();