this is my un-sql-injection safe version of the advanced mysql connectivity stuff
updating for sql injection proofing