Your MySQL table structure is pretty hard to read. Align the datatypes with tabs (like you would align a group of assignments) (btw, do that many of them need to be NOT NULL?)
There's a couple assignments that aren't aligned, you seem to be trying to keep that consistant
I try to format my code for an 80 character width display. Personal preference because it's a typical LCD