In the completed example application, the administrator of the site can create new poll questions with associated answers.
在完成的示例应用程序中,站点管理员可以创建具有关联答案的新调查问题。
The importance of exporting the current state of the answers is that it allows voting and getting the current results of the poll all in one step.
导出答案当前状态的重要之处在于,可以一步完成投票和获取当前调查结果的操作。
Figure 3 shows the list of answers for this poll.
图3显示了该调查的答案列表。
Screen capture of home screen with four answers for the poll.
含有四个调查答案的主屏幕的屏幕截图。
To make it easier on yourself, first create a helper function called build_answers that, when given a database handle and a poll ID, outputs the XML for all the answers to that poll (see Listing 4).
为了简单起见,首先创建一个名为build_answers的helper函数,当给定一个数据库句柄或调查ID后,该函数会输出该调查所有答案的XML(参见清单4)。
The build_answers function first USES the database connection to SQL query to get the answers for the specified poll.
build_answers函数首先连接至数据库执行SQL查询来获取指定调查的答案。
The second table, answers, holds the answers to each poll question, using the poll field to manage the relation and a count value with the current number of votes for that answer.
第二个表格answers 包含每个调查问题的答案,使用poll字段管理关系和当前答案投票数的计数值。
That poll ID is then sent to build_answers to output the current set of answers.
接着该调查ID会被发送至build_answers以输出当前的答案集。
It depends on how the questions and answers are phrased and what conclusions you are trying to draw from your poll.
这取决于问题和应答的措辞,还有您想从投票中得到什么样的结论。
When the user clicks a poll list item in the home page, the answers page displays.
当用户单击主页的调查列表项,会显示出答案页面。
Surveys are an effective way to take a poll of team members. All you need to do is specify a question and a list of answers.
调查是举行工作组成员投票的一种简便方法。您所需做的只是指定问题和一系列答案即可。
Surveys are an effective way to take a poll of team members. All you need to do is specify a question and a list of answers.
调查是举行工作组成员投票的一种简便方法。您所需做的只是指定问题和一系列答案即可。
应用推荐