rearranged order of subs for logical structure change (trying to have an order to reading the script); added mysql query sub, issue #27