Changed in to PDO

safe against SQL injection (relatively)
can use foreach function on selectTable return value (see dbcontext for
example)