MyBB Community Forums

Full Version: [MySQL 5 Compat] MySQL error 1364
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
mySQL error: 1364
Field 'notes' doesn't have a default value
Query: INSERT INTO gamezrulemybb_threads (fid, subject, icon, uid, username, dateline, lastpost, lastposter, views, replies, visible) VALUES ('1', 'Switched hosts.', '0', '2', 'Marc', '1136184583', '1136184583', 'Marc', '0', '0', '1');

That's what I Get when trying to start new threads.
I guess to solve it I must set a default value for 'notes' field.
How am I supposed to do that? (phpMyAdmin)
I didn't have a default value for the 'notes' field, it's empty.
Wierd.
How Do I Fix this error?

Kinda, I get it when Trying to start a new topic (After pressing submit).
Note, I am installing MySQL 5.
Now guests can't register, same error. Sad

mySQL error: 1364
Field 'signature' doesn't have a default value
Query: INSERT INTO gamezrulemybb_users (username, password, salt, loginkey, email, usergroup, regdate, lastactive, lastvisit, website, icq, aim, yahoo, msn, birthday, allownotices, hideemail, emailnotify, receivepms, pmpopup, pmnotify, remember, showsigs, showavatars, showquickreply, invisible, style, timezone, dst, threadmode, daysprune, regip, language, showcodebuttons, tpp, ppp, referrer) VALUES ('testing123', 'bb67393fbedee0194f660535a57fcb6f', '5kgHxvjQ', '1GskqMGYthxvpejh9DNenSIsUSMlCr4ToomEFX6DCNEHp7DxII', '[email protected]', '5', '1136206398', '1136206398', '0', '', '0', '', '', '', '', 'yes', 'no', 'no', 'yes', 'yes', 'no', 'yes', 'yes', 'yes', 'yes', 'no', '0', '+3', 'no', '', '0', '86.62.200.85', '', '1', '0', '0', '172');
Works.
Just installed MySQL 4 and no probs.
hmm. I'm running mySQL 5, and I seem to have no problems.
The problem with MYSQL 5 is you can not insert blank values ie:
INSERT INTO tablename (id, name) VALUES ('', 'John')
Notice the id column is blank, instead set it as NULL like so:
INSERT INTO tablename (id, name) VALUES (NULL, 'John')
That is only an example.

Specifiying the a default value in phpMyAdmin wont solve this either you have to specify the value when inserting or updating content to the database.
The interesting thing is that no empty values were going be submitted in that query.
I think it means the column in the database doesn't have a default value. ie on registration it doesn't submit a signature, and if there's no default value for the signature column, it will make an error.
Pages: 1 2