Colocou O Nome Correto Da Database Na Config.lua?
6
1.2k
info
Grupo: Artesão
Registrado: 15/03/13
Posts: 126
Reputação: +34
Char no Tibia: No Have

21 de março de 2013 às 09:08
info
Grupo: Artesão
Registrado: 03/11/10
Posts: 115
Reputação: +16

21 de março de 2013 às 09:19
Sim :c
21 de março de 2013 às 09:56
execute esses comandos na sua database POR ORDEM.
1º
DROP TABLE poll_votes;
2º
CREATE TABLE IF NOT EXISTS `poll_votes` ( `id` int(11) NOT NULL AUTO_INCREMENT, `answer_id` int(11) DEFAULT NULL, `poll_id` int(11) DEFAULT NULL, `account_id` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `poll_id` (`poll_id`), KEY `account_id` (`account_id`), KEY `answer_id` (`answer_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
3º
ALTER TABLE `poll_votes` ADD CONSTRAINT `poll_votes_ibfk_1` FOREIGN KEY (`answer_id`) REFERENCES `poll_answer` (`id`), ADD CONSTRAINT `poll_votes_ibfk_2` FOREIGN KEY (`poll_id`) REFERENCES `poll` (`id`), ADD CONSTRAINT `poll_votes_ibfk_3` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`);
não esqueça, 1 por vez.
Editado Março 21 por 1tyi
info
Grupo: Artesão
Registrado: 03/11/10
Posts: 115
Reputação: +16

21 de março de 2013 às 19:01
execute esses comandos na sua database POR ORDEM.
1º
DROP TABLE poll_votes;
2º
CREATE TABLE IF NOT EXISTS `poll_votes` ( `id` int(11) NOT NULL AUTO_INCREMENT, `answer_id` int(11) DEFAULT NULL, `poll_id` int(11) DEFAULT NULL, `account_id` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `poll_id` (`poll_id`), KEY `account_id` (`account_id`), KEY `answer_id` (`answer_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
3º
ALTER TABLE `poll_votes` ADD CONSTRAINT `poll_votes_ibfk_1` FOREIGN KEY (`answer_id`) REFERENCES `poll_answer` (`id`), ADD CONSTRAINT `poll_votes_ibfk_2` FOREIGN KEY (`poll_id`) REFERENCES `poll` (`id`), ADD CONSTRAINT `poll_votes_ibfk_3` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`);
não esqueça, 1 por vez.
Muito obrigado funciono ^^ REP+





info
Grupo: Artesão
Registrado: 03/11/10
Posts: 115
Reputação: +16
Alguem poderia me ajudar com esse erro:
A Database Error Occurred
Error Number: 1146
Table 'otserv.poll_votes' doesn't exist
SELECT * FROM poll_votes WHERE answer_id = 0