Export one form result

Permalink
Hello all

I'm having a bit of a nightmare exporting a single form result. I've managed to alter the controller to export them all as a CSV file, but I can't seem to access an individual response.

I've put together the following (basic) code to attempt to access a single response, using the Delete button's code as a starting point:

private function getOneResponse($asID){
        $db = Loader::db();
        $v = array(intval($asID));
        $q = 'SELECT * FROM btFormAnswers WHERE asID = ?';      
        $r = $db->query($q, $v);
        return $r;
    }


but in the object that is returned the `fields` array contains only one of the user's answers. None of the object's methods seem to do the trick.

Can anyone help? It seems like this should be easier than it is...

Any assistance much appreciated :)

Laurence

melat0nin