Joe
Joe

Reputation: 2591

Unknown column in where clause in query without where clause

I have following table:

CREATE TABLE `pckgs` (
`idPckg` int(11) NOT NULL AUTO_INCREMENT,
`name` char(32) COLLATE utf8_polish_ci NOT NULL,
`customCount` int(11) NOT NULL DEFAULT '0',
`baseCustomCount` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`idPckg`),
UNIQUE KEY `name` (`name`),
KEY `customCount` (`customCount`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_polish_ci

I have only one record in the table. I try to execute statement:

DELETE FROM pckgs;

but I got the error:

ERROR 1054 (42S22): Unknown column 'packOnly' in 'where clause'

It's kind of weird because I dont have any where clause in my simple query plus there is no such column as packOnly in a whole database. I need to delete it, how? I cannot restart server.

Upvotes: 2

Views: 1708

Answers (1)

John Woo
John Woo

Reputation: 263693

The possibility is that there are triggers set on the table or you are executing the wrong query. Bare in mind that the server is not lying. :D

Triggers are evil!

Upvotes: 3

Related Questions