Forum

Notifications
Clear all

Poll block (SOLVED)

Nadia
(@nadia)
Reputable Member Registered

Hey there,

I just wanted to activate the poll block and got probs right away. 🙁

Query: SELECT * FROM fanfiction_poll WHERE poll_end IS NULL OR poll_end = '0000-00-00 0000' ORDER BY poll_id DESC LIMIT 1
Error: ()

This is the message I get everytime I try to reach the admin center again.

My shoutbox and welcome message are missing too. 😳 How can I fix this?

Website: http://treknation.net
Version: 3.5.3

My Hub TrekNation | World of X | Capeside Diaries

Quote
Topic starter Posted : 01/04/2012 4:51 am
Lyndsie
(@lyndsie)
Member Moderator

Looks like you got it working. Do you still need any help?

ReplyQuote
Posted : 28/05/2012 1:12 am
Nadia
(@nadia)
Reputable Member Registered

Oh, no thanks. My hubby fixed it for me. 😀

My Hub TrekNation | World of X | Capeside Diaries

ReplyQuote
Topic starter Posted : 09/06/2012 7:14 pm
authormelanieray
(@authormelanieray)
New Member

But what exactly did he do? This is the only post I can find with this error, and this is my exact error too.

Should I start a new thread to get the answer since this thread is so old?

ReplyQuote
Posted : 01/07/2016 12:46 pm
Sheepcontrol
(@sheepcontrol)
Reputable Member

Well, it's been properly necro'ed, so no new topic required.

Problem is, I have no idea what I did to fix things back then.

Can you check if the poll tables in the database exist? That was/is a major thing with efiction, "forgetting" to create required tables.
They would be called fanfiction_poll and fanfiction_poll_votes.

If they do exist, can you get access to the server logs?

ReplyQuote
Posted : 03/07/2016 10:44 am
authormelanieray
(@authormelanieray)
New Member

Oh, that's weird. You're right though, I have nothing for polls at all.

ReplyQuote
Posted : 03/07/2016 5:33 pm
Sheepcontrol
(@sheepcontrol)
Reputable Member

In that case:

CREATE TABLE IF NOT EXISTS `fanfiction_poll` (
  `poll_id` int(11) NOT NULL,
  `poll_question` varchar(250) NOT NULL,
  `poll_opts` text NOT NULL,
  `poll_start` datetime NOT NULL,
  `poll_end` datetime DEFAULT NULL,
  `poll_results` varchar(250) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

ALTER TABLE `fanfiction_poll`
  ADD PRIMARY KEY (`poll_id`);

ALTER TABLE `fanfiction_poll`
  MODIFY `poll_id` int(11) NOT NULL AUTO_INCREMENT;

and

CREATE TABLE IF NOT EXISTS `fanfiction_poll_votes` (
  `vote_id` int(11) NOT NULL,
  `vote_user` int(11) NOT NULL DEFAULT '0',
  `vote_opt` int(11) NOT NULL DEFAULT '0',
  `vote_poll` int(11) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

ALTER TABLE `fanfiction_poll_votes`
  ADD PRIMARY KEY (`vote_id`),
  ADD KEY `vote_user` (`vote_user`,`vote_poll`);

ALTER TABLE `fanfiction_poll_votes`
  MODIFY `vote_id` int(11) NOT NULL AUTO_INCREMENT;
ReplyQuote
Posted : 08/07/2016 6:24 pm
authormelanieray
(@authormelanieray)
New Member

Thank you very much, I appreciate it.:)

ReplyQuote
Posted : 16/07/2016 2:33 pm
Share: