Function __global->add_poll

Definitions

sources/polls2.php

  • Add a new poll to the database, then return the ID of the new entry.
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: int

Parameters

Name Type Default Set Range Description
$question SHORT_TEXT required parameter N/A N/A The question
$a1 SHORT_TEXT required parameter N/A N/A The first choice
$a2 SHORT_TEXT required parameter N/A N/A The second choice
$a3 SHORT_TEXT Blank (empty string) N/A N/A The third choice (blank means not a choice)
$a4 SHORT_TEXT Blank (empty string) N/A N/A The fourth choice (blank means not a choice)
$a5 SHORT_TEXT Blank (empty string) N/A N/A The fifth choice (blank means not a choice)
$a6 SHORT_TEXT Blank (empty string) N/A N/A The sixth choice (blank means not a choice)
$a7 SHORT_TEXT Blank (empty string) N/A N/A The seventh choice (blank means not a choice)
$a8 SHORT_TEXT Blank (empty string) N/A N/A The eighth choice (blank means not a choice)
$a9 SHORT_TEXT Blank (empty string) N/A N/A The ninth choice (blank means not a choice)
$a10 SHORT_TEXT Blank (empty string) N/A N/A The tenth choice (blank means not a choice)
$num_options ?integer Null N/A N/A The number of choices (null: calculate)
$current BINARY 0 N/A N/A Whether the poll is the current poll
$allow_rating BINARY 1 N/A N/A Whether to allow rating of this poll
$allow_comments SHORT_INTEGER 1 N/A N/A Whether comments are allowed (0=no, 1=yes, 2=review style)
$allow_trackbacks BINARY 1 N/A N/A Whether to allow trackbacking on this poll
$notes LONG_TEXT Blank (empty string) N/A N/A Notes about this poll
$time ?TIME Null N/A N/A The time the poll was submitted (null: now)
$submitter ?MEMBER Null N/A N/A The member who submitted (null: the current member)
$use_time ?TIME Null N/A N/A The time the poll was put to use (null: not put to use yet)
$v1 integer 0 N/A N/A How many have voted for option 1
$v2 integer 0 N/A N/A How many have voted for option 2
$v3 integer 0 N/A N/A How many have voted for option 3
$v4 integer 0 N/A N/A How many have voted for option 4
$v5 integer 0 N/A N/A How many have voted for option 5
$v6 integer 0 N/A N/A How many have voted for option 6
$v7 integer 0 N/A N/A How many have voted for option 7
$v8 integer 0 N/A N/A How many have voted for option 8
$v9 integer 0 N/A N/A How many have voted for option 9
$v10 integer 0 N/A N/A How many have voted for option 10
$views integer 0 N/A N/A The number of views had
$edit_date ?TIME Null N/A N/A The edit date (null: never)

Return

  • The poll ID of our new poll
  • Type: AUTO_LINK
  • Set: N/A
  • Range: N/A