DROP TABLE IF EXISTS `mazzo`;
CREATE TABLE IF NOT EXISTS `mazzo` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`idgiocatore` int(11) NOT NULL,
`idcarta` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
I can no execute the following queries:
INSERT INTO `mazzo` (`id`, `idgiocatore`, `idcarta`) VALUES
('', '', '');
INSERT INTO `mazzo` (`id`, `idgiocatore`, `idcarta`) VALUES
(null, '', '');
INSERT INTO `mazzo` (`idgiocatore`, `idcarta`) VALUES
('', '');
In all of these cases I get a new row with a new auto_increment value, so everything is ok?
Hi there,
I don`t really understand the problem.
I tested the following table:
DROP TABLE IF EXISTS `mazzo`;
CREATE TABLE IF NOT EXISTS `mazzo` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`idgiocatore` int(11) NOT NULL,
`idcarta` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
I can no execute the following queries:
INSERT INTO `mazzo` (`id`, `idgiocatore`, `idcarta`) VALUES
('', '', '');
INSERT INTO `mazzo` (`id`, `idgiocatore`, `idcarta`) VALUES
(null, '', '');
INSERT INTO `mazzo` (`idgiocatore`, `idcarta`) VALUES
('', '');
In all of these cases I get a new row with a new auto_increment value, so everything is ok?