selectTable() now uses prepared statements