From: David L. <lio...@co...> - 2005-03-10 03:14:52
|
When you archive a survey in phpESP, the survey is removed from view and the results become inaccessible. The following is what you can do to reinstate an archived survey -- it's submitted here for the record. In brief, you need to go into the mysql database that phpESP uses and reset the status of the archived survey. 1. First you need to locate the ID of the survey -- the number assigned consequtively to each new survey. If you already have this information, you can skip this step. To locate the ID, issue mysql -e 'select * from survey order by changed desc limit 5' phpesp | more This asks for a listing, in descending order, of the latest changes made to the fields in the survey table. Set the limit to ensure your archived survey is included; you can use a range such as 10,15. The status field of the archived survey in my case was set to 15; an active survey has status 1. 2. Second, to be on the safe side, you may want to backup your table of surveys, in case something goes wrong: mysqldump phpesp survey > survey-table-backup-2005-03-09.txt If you need to recreate the survey table, you have the data in this file. 3. Third, take out the knife and perform a slight incision and surgical manipulation as follows: mysql -e 'update survey set status = 1 where id=101' phpesp The number -- in this example 101 -- is the ID of your survey, determined in step 1 above. That's all there's to it. The archived survey is now reactivated, and the results are again available. Dave P.S. In order to use "mysql -e" and "mysqldump" commands in this manner, you need to have your user name and password entered in a file called ~/.my.cnf. Alternatively you can add "-u root -p" to the commands and enter the password manually: mysql -u root -p -e 'select * from survey order by changed desc limit 5' phpesp Finally, changing the status of a survey is likely also possible from phpmyadmin, a web interface to your mysql databases; I've just installed it and not played around with it much, but it has a very user-friendly interface. |