fixed list
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user