Budget buddy is coming along, Im working on the transactions page. I worked for a couple hours trying to get an htaccess file to work before realizing that my apache server wasn't set up right, and then had to rework a bunch of code to make the site work again. Alot of relative linking was going awry. Luckily a bit of GIT magic brought me back to working correctly so, its ok!
Coding today took a fun detour for about 10 minutes while I tried to figure out why I couldn't apply a foreign key to my database after successfully applying one before. Heres what I had as a problem and how I solved it:
3 Tables, userinfo which has a primary key of userid, accounts which has a userid associated with it and a name (as well as an amount), and then a transactions table I had just made. So I successfully altered transactions to reference userid from userinfo so that it cascades for both updating and deleting. And if anyone doesn't know how to do it, this is the page I go to everytime I need it: This site is good for foreign key info
But then I went to apply the accountname from transactions to be a foreign key from accounts and started getting this errono-150 bit. Completely unhelpful, saying I couldn't create a table such and such. This unhelpful bit led me to google the error number and I quickly stumbled onto this link. After looking at a couple of the reasons for error I figured it was because the account names weren't indexed. I hadn't told them to be primary keys because multiple users could have an account called "Checking". But then I read up on indexing and then used the mysql documentation on create index to add an index to my table. Tried to alter it again, and viola, foreign key accepted.
I hope that if anyone gets an error similar to the one I experienced that they find this blog and use the good couple of links to fix it!
On a side note:
Has anyone ever noticed that viola, when pronounced with a bit of an accent should probably be spelt walah?
Showing posts with label Budgeter. Show all posts
Showing posts with label Budgeter. Show all posts
Sunday, September 2, 2012
Friday, August 31, 2012
Budget Buddy Homepage
After a half hour of messing with the css, I finally got the buttons in my home page to center well. This is the main home page of budget buddy, if you have accounts it displays them like the above and if it doesn't then it displays the following error message:
All in all, the login, signup, and now home page are functioning correctly, now I just have to make everything else! So excited!
Tuesday, August 28, 2012
Budget Buddy in php
https://github.com/EJEHardenberg/BudgetBuddy
Well I've tried to do this project a few times already, and most of the time the method of storing the data was the primary inconvenience in java and c#. But with php I can use mysql to easily store anything and everything.
So I'm modeling it like an app, and this is what I have so far. A clean interface, and a sign up and login page that are working. Well, I'm currently working on making the log-in secure but besides that its all good. This has been my baby for the last 2 days. And after some CSS magic and stack overflow results I fixed an error that had stuck me and I can keep working.
Word for the wise, do NOT store hash's into a binary type sql field. Binary types mess with strings and can cause string comparisons to result in errors, I learned this the hard way over the past few days until I stumbled onto a small comment on a stack overflow page about hashing.
Well I've tried to do this project a few times already, and most of the time the method of storing the data was the primary inconvenience in java and c#. But with php I can use mysql to easily store anything and everything.
So I'm modeling it like an app, and this is what I have so far. A clean interface, and a sign up and login page that are working. Well, I'm currently working on making the log-in secure but besides that its all good. This has been my baby for the last 2 days. And after some CSS magic and stack overflow results I fixed an error that had stuck me and I can keep working.
Word for the wise, do NOT store hash's into a binary type sql field. Binary types mess with strings and can cause string comparisons to result in errors, I learned this the hard way over the past few days until I stumbled onto a small comment on a stack overflow page about hashing.
Tuesday, August 23, 2011
Budget Buddy Progress!
This is the current progress of my budgeting program, the code and classes are made up for the accounts, checks, months, everything. The GUI and interlacing it with the underlying modules is all thats left. I've already started doing that, right now the 5 buttons at the top are the only things not working, as well as a few of the menu items.
On the to do list is:
The add items buttons and the other buttons associated with items and the main scroll pane that will hold the items that go into the budgeting for checks.
After thats done, making the GUI change when you select a different month and check and updating the panes that show information.
After that, the menu items such as saving and loading need to be done. After all of the main stuff, I just need to create the other panes such as the graphics and other things.
It will probably be another week or so before it's done.
Thursday, August 11, 2011
Budgeter
Hello Everyone!
I've decided on a project to do before I have to go back to school. I'm making a program that is effectively a smart checkbook. Only, right now I'm not making it to keep track of finances, but to budget them effectively.
Basically, When I get my checks from work, I open notepad and a calculator, enter my check amount into it, then slowly subtract out items as I enter them into the notepad document. So, basically I'm wrapping my setup into a program, and it seems like it's a good idea, mainly because 4 of my friends have taken an interest and have already asked to test my program once it's done. (As done as any program can get, aka release version that gets patches)
Right now I'm fighting between the urge to continue working on it, and the urge to go to bed, it is midnight, and I do have to get up at 7 tomorrow.... but when the mood takes one to code, you do not simply ignore it.
I've decided on a project to do before I have to go back to school. I'm making a program that is effectively a smart checkbook. Only, right now I'm not making it to keep track of finances, but to budget them effectively.
Basically, When I get my checks from work, I open notepad and a calculator, enter my check amount into it, then slowly subtract out items as I enter them into the notepad document. So, basically I'm wrapping my setup into a program, and it seems like it's a good idea, mainly because 4 of my friends have taken an interest and have already asked to test my program once it's done. (As done as any program can get, aka release version that gets patches)
Right now I'm fighting between the urge to continue working on it, and the urge to go to bed, it is midnight, and I do have to get up at 7 tomorrow.... but when the mood takes one to code, you do not simply ignore it.
Subscribe to:
Comments (Atom)