Database Tables Transactions and Accounts
John Ralls
jralls at ceridwen.us
Sun Mar 6 23:32:30 EST 2011
On Mar 6, 2011, at 7:37 PM, Matt Riley wrote:
> Hello,
>
> I would like to know if there's a cross reference table or file that maps the
> 'guid' database column of the tables 'transactions' and 'accounts' together. I
> explored the other database tables and at first glance there does not appear to
> be one. I'm using MySQL as the local database.
>
> Any help is greatly appreciated.
Transactions aren't directly linked to accounts, splits are, so to put together a transaction with its accounts you'll do
something like
select * from t=transactions, s=splits, a=accounts join on s.tx_guid = t.guid and s.account_guid = a.guid...
(The syntax isn't quite right, but you get the idea.)
Regards,
John Ralls
More information about the gnucash-devel
mailing list