Skip to Content

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

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.