MVC / Database abstracting: implemented where functions for db call