Parsing Credit Union MemberDirect Statements

Building on the work I did earlier in the week to automate the download of credit union statements, I’ve now created code to parse those statements and dump the transactions into a MySQL database table.

The memberdirect-parsestatements.php code will ingest a directory full of MemberDirect electronic statements and insert a database record for each transaction. Once you have your transactions in a database, you can then do fun things like this:

SELECT date_format(date,"%Y-%m") AS yearmonth,sum(amount) AS total 
  FROM transactions 
  WHERE amount < 0 AND item = 'CASA MIA' 
  GROUP BY yearmonth

that shows month-by-month spending at Casa Mia.

I’m not sure how much the electronic statement format varies from MemberDirect credit union to credit union, so the script may require tweaking if you’re not using it to parse Metro Credit Union statements.

Comments

Post new comment

You can comment anonymously if you must, but I would prefer it if you used your real name.
The content of this field is kept private and will not be shown publicly. If you have a Gravatar account associated with the e-mail address you provide, it will be used to display your avatar.
Optional. If you enter the address of a website here, your name will be publicly linked to the site.
  • Adds typographic refinements.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.