Results 1 to 2 of 2
Thread: Inserting a new poll in Mysql??
Feb 9, 2002, 01:19 #1
- Join Date
- Feb 2002
- Reykjavik, Iceland
- 0 Post(s)
- 0 Thread(s)
Inserting a new poll in Mysql??
Would someone be nice to help me with this poll ? =)
I´m developing a little POll for my site
I´m done with the script that calculates and view the poll and the "vote" insert query and now i´m struggling with the NEW POLL query, how i insert a new poll in the database.
I have the poll in 3 tables
The questions itself are stored in a table called "poll_questions"
ID auto inchrement
and another table for "possibilites"
ID_question << this contains the id of the question
And now i´m gonna see how one poll qould look like in this tables
The question is "Does this question mean i´m total idiot"?
and the possibilities are yes,no,you´re ok..
writer_id  << whatever!
question [Does this question mean i´m total idiot]
and the possibilites table would be
possibilite [you´re ok..]
I also have another table for answears but that is no need to show that..
And what query would i have to have to insert this new poll into this database?
In the form page would the input form that has the name "pollquiz" and the possibilities input boxes that are up to 5 has name name answear1,answear2,answear3,answear5
Could somone give me a taste of the code that would insert this new poll into this tables in database?
That would be greatly appreciate?