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
I prefer 72 columns... because there are times when it's good to print out code in hard copy, and even today, most teletypes^H^H^H^H^H^H^H^H^H printers are 72 columns wide.
Besides, it'll make your source code fit on punch-cards.