Hi Guys,
I'm trying to develop an opinion poll on my website (Visual Studio 2005) using c# code and a MYSql db.I have created the db and the admin side of the project for adding new polls to the db and deleting polls but I dont know how I can re-create them for the main section of the website i.e converting the questions in the db, which are in text form, into radio boxes, and then storing the votes in the db and generating a graphical view.
The Tables I have created are as follows: - create table pollQuestions
-
-
(
-
-
pk_Id int auto_increment not null,
-
-
question varchar(100) not null,
-
-
answer1 varchar(50) not null,
-
-
answer2 varchar(50) not null,
-
-
answer3 varchar(50) not null,
-
-
answer4 varchar(50) not null,
-
-
answer5 varchar(50) not null,
-
-
primary key(pk_Id),
-
-
unique id(pk_Id)
-
-
);
-
-
-
create table pollAnswers
-
-
(
-
-
pk_Id int auto_increment not null,
-
-
pollId int not null,
-
-
answer varchar(50) not null,
-
-
visitorIP varchar(15) not null,
-
-
primary key(pk_Id),
-
-
unique Id(pk_Id)
-
-
);
I can Insert and delete values into pollQuestions but am having trouble trying to save these answers into pollAnswers and generating a graph with them. Also is there a way I can save the voters ip address to ensure only 1 vote is cast per person.
Apologies for being long-winded but any help would be fantastic.
Thanks
3 2882
Please specify the error problem that you are having saving to poll answers. What do you plan to use to draw the graph? Does using an IP identifier label corporate users as potentially one user? Maybe using a session or cookie to identify users would be better.
Please specify the error problem that you are having saving to poll answers. What do you plan to use to draw the graph? Does using an IP identifier label corporate users as potentially one user? Maybe using a session or cookie to identify users would be better.
I'm very new to this whole area of programming and db's and all that so i was wondering how do i store the selected 1 of the 5 answers into the answer table and increment it so that every time the answer is selected, its incremented. I was hoping to build just a basic bar graph showing the results to date but am unsure how this could be achieved in visual studio 2005
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: JDJones |
last post by:
I'd like to put up two polls on my web site on a single page. I will be
using a free remotely hosted poll service. That part is easy.
But I want to remove the two individual <a href> links that have to be
clicked to call the current results individually and replace them with a
single link that will be used to call the results of both pages and
display them at the same time, most likely in a table.
Can PHP be used to do this? How would...
|
by: Doug Holton |
last post by:
George W Bush, as certified by Florida's election commission.
Which decorator syntax do you like the most? See
http://wiki.wxpython.org/index.cgi/PythonDecoratorsPoll
A. @classmethod def foo(): (82) 14%
C1. def foo() : (235) 41%
E1. def foo(): @classmethod (260) 45%
Total Votes: 577
|
by: Paul McGuire |
last post by:
Well, after 3 days of open polling, the number of additional votes have
dropped off pretty dramatically. Here are the results so far:
Total voters: 55 (with 3 votes each)
Votes for each choice or group of choices:
Any J 81
J2 78
Any C 40
C1 29
Any D 9
|
by: Lad |
last post by:
Is there a poll script available in Python?
|
by: Magnus Lycka |
last post by:
I'm trying to read standard out in a process started with popen2
in a non-blocking way. (Other good ways of doing this than the
one I tried are appreciated.)
I've tried to dumb down my code to see what happens, and
socket.poll seems to behave very strangely. I've tried to
use the .poll method for the poll object with and without
a timeout, but in either case, the output randomly switches
between on of the versions below. It runs fast,...
| |
by: jinfeng_Wang |
last post by:
I have writen the following souce code :
m_Socket = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp);
m_Socket.Blocking = false;
try
{
m_Socket.Connect(ipEndPoint);
}
|
by: pbd22 |
last post by:
Hi.
I am trying to poll a long-running process via a hidden IFrame.
I am noticing that the online errata gives advice for handling a
server response:
window.parent.handleServerResponse();
The problem I am having with this is that the above function
gets called ***after*** the long-running response is completed.
|
by: chsalvia |
last post by:
I'm trying to implement a simple poll loop which asynchronously
fetches a list of URLs. Since I'm used to working with multiple
threads, I have little experience using single-threaded IO
multiplexing. I wrote a small program to try to get it to work, but
I'm having difficulty.
I connect to a bunch of non-blocking sockets, then poll them for
activity. On POLLOUT, I send an HTTP request. On POLLIN, I recv
incoming data. But the loop...
|
by: webcm123 |
last post by:
I'm making some changes in poll module. I don't know which method of
storing options of poll is better. The main data of polls are in POLLS
table.
Speed and efficiency is the most important issue. There are 2 methods:
1. Storing options in ANSWERS table and executing 2 queries to get
poll's data and options. Number of records connected with a poll in
that table is equal to number of poll's options.
|
by: 7stud |
last post by:
Hi,
What is the difference between:
1) getting the returncode directly from the subprocess object
2) calling poll() on the subprocess object?
Here is an example:
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |