Moving Products SQL queries from controllers to model