Ir para conteúdo

Featured Replies

Postado

Eae pessoal to com um problema em meu xamp para testes

Versão xamp 1.7.3

Windows 7

Website modern acc

 

Em todas as databases que testei da este mesmo problema:

A Database Error Occurred

Error Number: 1054

Unknown column 'p.question' in 'field list'

SELECT p.id, p.question, GROUP_CONCAT(a.answer SEPARATOR ';') AS answers, GROUP_CONCAT(a.id SEPARATOR ';') AS answers_id FROM poll p JOIN poll_answer a ON p.id = a.poll_id WHERE p.status = 1 AND date_start <= NOW() AND date_end >= NOW()

 

 

Bom antes deste erro aparecia para que eu criasse tabelas novas como 'news' 'poll' 'pollanser'

Alguém me ajuda? Rep+

 

Postado
  • Autor

Rusherzin o erro continuou só que ao executar:@Rusherzin, apareceu #1060 - Duplicate column name 'question'

  Em 06/09/2014 em 01:11, Rusherzin disse:
ALTER TABLE `z_polls` ADD `question` varchar(255) NOT NULL;
Postado

Então, tenta essa:
 

CREATE TABLE IF NOT EXISTS `polls` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`player_id` int(11) NOT NULL,
`poll` varchar(255) NOT NULL,
`options` varchar(255) NOT NULL,
`timestamp` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `player_id` (`player_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

CREATE TABLE IF NOT EXISTS `poll_votes` (
`poll_id` int(11) NOT NULL,
`votes` varchar(255) NOT NULL,
`account_id` varchar(255) NOT NULL,
KEY `poll_id` (`poll_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `z_polls` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`question` varchar(255) NOT NULL,
`end` int(11) NOT NULL,
`start` int(11) NOT NULL,
`answers` int(11) NOT NULL,
`votes_all` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

CREATE TABLE IF NOT EXISTS `z_polls_answers` (
`poll_id` int(11) NOT NULL,
`answer_id` int(11) NOT NULL,
`answer` varchar(255) NOT NULL,
`votes` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo