Hi, I get this error when I try to add a new record to my MySQL Database.
"Column count doesn't match value count at row 1"
So after searching through this forum it seems the problem is that the number of columns in my query doesnt match up to the number of columns in my table. Seems fairly easy to fix doesnt it. However my query has exactly the same number of columns as my table, they are also in the same order.
Query:
INSERT INTO armies (ArmyID, LocationX, LocationY, Faction, NumOfUnits, UnitType, MovementPoints, Class, OnTransport, Veteran, AttackBonus, DefenceBonus, Engaged, IsRebel) VALUES ('33', '18', '8', 'Lindon', '5000', 'Rangers', '4', 'infantry', '0', '0', '0', '0', 'no' 'no')
Table:
Table "armies" DDL
CREATE TABLE armies (
ArmyID int(11) NOT NULL default '0',
LocationX int(11) NOT NULL default '1',
LocationY int(11) NOT NULL default '1',
Faction char(255) NOT NULL default '-',
NumOfUnits int(11) NOT NULL default '1',
UnitType char(255) NOT NULL default '-',
MovementPoints int(2) NOT NULL default '4',
Class char(50) NOT NULL default 'infantry',
OnTransport int(11) NOT NULL default '0',
Veteran int(2) NOT NULL default '0',
AttackBonus int(2) NOT NULL default '0',
DefenceBonus int(2) NOT NULL default '0',
Engaged char(3) NOT NULL default 'no',
IsRebel char(3) NOT NULL default 'no',
PRIMARY KEY (ArmyID)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
Any ideas? Im sure its just a little thing Ive overlooked.