From: Brian W. <br...@uc...> - 2003-11-25 22:41:10
|
resending to list. >Date: Tue, 25 Nov 2003 10:12:22 -0800 >To: Johan Geertsma <Joh...@co...> >From: Brian Wood <br...@uc...> >Subject: Re: [phpesp-dev] remove respndents results. > >At 05:02 PM 11/25/2003 +0100, you wrote: >>Hi, >> >>Can someone tell me how to remove the results from 1 respondent? >> >>I now did it to set the COMPLETE to N. But I want to remove all the stuff >>that this person submitted. I know how to find out which id he.she has. > >Setting response.complete = N means that the person has not completed the >survey. If this is a private survey (requiring the respondent to login) >you might be limiting the number of responses to 1. In this case the N >setting will allow this person to take the survey again. Probably you >know that... > >To remove a response: > >(Take care at the mysql console, you can do great harm with an unqualified >'delete' or 'update'!!!) > ><pre> >select * from response where username = 'joeblow' and survey_id =9 >+----+-----------+----------------+----------+----------------------------------+ >| id | survey_id | submitted | complete | >username | >+----+-----------+----------------+----------+----------------------------------+ >| $rid | 9 | 20031008132225 | Y | joeblow | >+----+-----------+----------------+----------+----------------------------------+ >1 row in set (0.03 sec) > >Make sure this is the right row! Then: > >delete from response where username = 'joeblow'; > >Substitute the correct value for $id > >select * from response_text where response_id = $id; > >Make SURE the responses you see here are the ones you want to remove! > >delete from response_text where response_id = $id; > >Do the analogous deletes for the remaining response tables: > >show tables like 'response%'; >+------------------------------------+ >| Tables_in_phpesp_devel (response%) | >+------------------------------------+ >| response | >| response_bool | >| response_date | >| response_multiple | >| response_other | >| response_rank | >| response_single | >| response_text | >+------------------------------------+ >8 rows in set (0.00 sec) > ></pre> > > >You'll probably want to avoid going through all this in the future! > >Brian Wood >Programmer/Analyst >UC Berkeley Human Resources > > > > > >>Why? >>Well that is my next question. How can I disable the enter key? >>When people start a survey and hit enter, the form is submitted. >>(yeah I could use the option that all answers are required). But you >>guess it, the survey is not jet complete. >> >>I searched around for something to disable the enter key, but I see that >>there is >>a little javascript that does something before sending. >> >>anyone? >> >>Thanks, >>Johan >> >> >>------------------------------------------------------- >>This SF.net email is sponsored by: SF.net Giveback Program. >>Does SourceForge.net help you be more productive? Does it >>help you create better code? SHARE THE LOVE, and help us help >>YOU! Click Here: http://sourceforge.net/donate/ >>_______________________________________________ >>phpESP-devel mailing list >>php...@li... >>https://lists.sourceforge.net/lists/listinfo/phpesp-devel > >Brian Wood >Programmer/Analyst >UC Berkeley Human Resources |