Reputation: 522
I'm stumped have been playing with it for awhile, I've set everything but the primary key to allow nulls, I've tried removing some fields, but nothing works.
call Create_Login('Username', 'Passkey', 'Key', 1, 1, 1);
Error Code: 1136. Column count doesn't match value count at row 1 0.078 sec
CREATE DEFINER=`testdb`@`%` PROCEDURE `Create_Login`(
_Username varchar(15),
_Password varbinary(160),
_Salt varbinary(110),
_priviledge tinyint(3),
_WorkerID int,
_empID int
)
BEGIN
Insert INTO Login
Values (_Username, _Password, _Salt, _WorkerID, _priviledge, Curdate(), CURDATE(),
_empID);
END
any help would be greatly appreciated also i've tried quoting and unquoting everything nothings worked so far. 6 input values, 6 supplied
Edit: I should add I've tried different values and such
Upvotes: 0
Views: 1455
Reputation: 522
Found the problem out apparently when I clicked a row in my table the thing made an extra column. That's why specifying the values worked. Touchy DB...
Upvotes: 0
Reputation: 11117
Your problem come from your INSERT
query. Maybe there are one or several missing columns in your INSERT
. BTW It is highly recommended to specify the column names in the INSERT
For instance:
INSERT INTO table_name (column1, column2, column3,...)
VALUES (value1, value2, value3,...)
Upvotes: 1