I need to make multiple SQL requests, but only if there needed. I\'m not sure if this is the best way of doing it, I was wondering if there is a easier or more efficient way?