My query is returning the same row twice. Any idea why and how I can get it to only do so once?
SELECT txn.id, txn.ref, txn.date, txn.payee, txn.amount, txn.memo, txn.parentID, txn.catID, txn.acctID, txn.children, bal.amount runningBal
FROM transactions txn
INNER JOIN txnRunningBal bal ON txn.acctID = bal.acctID
LIMIT 0 , 30
This is what the query returns:
id ref date payee amount memo parentID catID acctID children runningBal
92 NULL 2015-12-10 asfa 10 NULL 0 4 1 NULL 10
93 NULL 2015-12-19 asdfasf 5 NULL 0 1 5 NULL 5
92 NULL 2015-12-10 asfa 10 NULL 0 4 1 NULL 15
SELECT txn.id, txn.ref, txn.date, txn.payee, txn.amount, txn.memo, txn.parentID, txn.catID, txn.acctID, txn.children, bal.amount runningBal
FROM transactions txn
INNER JOIN txnRunningBal bal ON txn.acctID = bal.acctID
LIMIT 0 , 30
This is what the query returns:
id ref date payee amount memo parentID catID acctID children runningBal
92 NULL 2015-12-10 asfa 10 NULL 0 4 1 NULL 10
93 NULL 2015-12-19 asdfasf 5 NULL 0 1 5 NULL 5
92 NULL 2015-12-10 asfa 10 NULL 0 4 1 NULL 15