New select function implementation
Now no needs to write a sql query in parameters, just table name and fields