updated the way the database connectivty/query generation works
username and password now held in cli/php.ini
turned database into singleton "mysql_instance"