PHP 5.5+ quasi integrated query