From: Jim B. <jp...@si...> - 2005-07-13 19:19:31
|
* Robin Gower <rg...@st...> [2005-07-13 06:18]: > > We have some duplication in responses. The guy entering the data has mistakenly pressed return mid-way through a survey (rather than tab) and has mistakenly submitted partly-completed responses. On multiple occassions! > > To my knowledge phpESP doesn't have the facility to delete responses. I could simply export the data, de-duplicate the responses, and then analyse (i.e. in Excel). I'd rather use phpESP analysis tools however. Thus I need accurate data in MySQL. > > My guess would be to use phpMyAdmin to delete the relevant records from the 'response' table. What would be the repercussions of this? Would the data in other 'response_...' tables become corrupted? Will all the cross-tabbing still work? > > Has anyone else experienced this problem - are some safeguards (submit: are you sure y/n?) or additional functions (overwrite responses) required? > > cheers, > > -- > Robin Gower Well, my solution is crude. I used mysql directly. It's cumbersome, but it works for me. YMMV. You'll have to locate the entry in the response table and note the 'id' field value. This is a join key with the other response_* tables (response_bool, response_date, etc.) The field name in the other tables is 'response_id'. Example: DELETE FROM response WHERE id = 123; DELETE FROM response_bool where response_id = 123; DELETE FROM response_date where response_id = 123; DELETE FROM response_multiple where response_id = 123; DELETE FROM response_other where response_id = 123; DELETE FROM response_rank where response_id = 123; DELETE FROM response_single where response_id = 123; DELETE FROM response_text where response_id = 123; It can be difficult to find a specific responder when you have a lot of respnoses. You can sometimes find a specific responder by searching for a known bit of text: SELECT response_id, response FROM response_text WHERE response LIKE '%foobar%'; IMPORTANT NOTE: The 'View Results' selection on the management interface displayes individual survey responses with a number in the selection tab. This number is a display item only and is NOT the same as the response.id field! Do not use the number displayed in the tab as the response_id value in the examples above! Cross tabbing and cross analysis still work. Best Regards, Jim B. PS- I don't use realms or private 'respondents'. I don't have any knowlege if the above works with those cases or not. |