Всем доброго времени суток!
Есть такая таблица:
CREATE TABLE bibles.readers(
rid INT(11) NOT NULL AUTO_INCREMENT,
firstName VARCHAR(32) DEFAULT NULL,
secondName VARCHAR(32) DEFAULT NULL,
blocked INT(11) NOT NULL DEFAULT 0,
PRIMARY KEY (rid)
)
ENGINE = MYISAM
AUTO_INCREMENT = 1
CHARACTER SET cp1251
COLLATE cp1251_bin;
INSERT INTO readers (secondName)
SELECT secondName FROM DUAL
WHERE NOT EXISTS(
SELECT secondName FROM readers
WHERE firstName = @fName AND secondName = @sName LIMIT 1);
Unknown column 'secondName' in 'field list'