View Single Post
Old 02-03-2008, 01:04 PM   #5 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default

Quote:
Originally Posted by ReSpawN View Post
sql Code:
CREATE TABLE `polls` (
   `id` int(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
   `title` varchar(20) NOT NULL,
   `options` varchar(2000) NOT NULL,
   `amount` varchar(36665) NOT NULL,
   )ENGINE=INNODB

First off, this is honestly no way to make a poll. Your title should be varchar(255), options should be a longtext and as for amount, I seriously don't know what you want with this one.

Do not be scared of making more tables. A poll can easily take up 2 or more database tables. First the cats, then the poll itself, the options and the votes and so on. Maybe even a configurationtable for the options.

I would first have to know what is in your database and how it is composed. I do not think this is the right approach. You keep checking if there is data but the poll can't exist without data, so the checks are useless. Make sure you do not use the $_GET['id']. Or only when it's directly linked to. That'll be OK.

I think your first step it to take it from the ground up again and make sure every time you echo something making sure the script is working.

When you make a post like that, you could've easily helped him out.
Thanks a lot! :D I will remake it.. :] And remember what you said. I'm just a newbie at MySQL, when I'm making these applications, it really just messed with me and my code. You know. :D
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote