SQL Query helper class for PHP