Jump to the post that solved this thread.
Solved: 3 Years, 1 Month ago i am getting SQL error when i want to delete a post permanently.
#1
Solved: 3 Years, 1 Month ago
Whenever i am trying to permanently delete a post
i am getting this type of SQL error.

SQL Error:
1364 - Field 'notes' doesn't have a default value
Query:
INSERT INTO mybb_threads (`dateline`,`lastpost`,`fid`,`subject`,`uid`,`username`,`visible`,`closed`) VALUES (1640685844,1640685844,43,'RE: The best-selling rosin press on ecoarm.ca, Christmas promotion!',1,'PARADOX',1,'yes')

please tell me how can i solve this error.

i fixed it myself by run this query :- 
ALTER TABLE `mybb_threads` CHANGE `notes` `notes` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0';
Reply
#2
Solved: 3 Years, 1 Month ago
Mark your thread as solved.
Tunisian.
Reply
#3
Solved: 3 Years, 1 Month ago
It looks like your database structure of table mybb_threads is a little different from what MyBB ships.

By the way, what's the database and the version of it your forums on?
Could be wrong but worth a try.
Email me at: [email protected]
Reply
#4
Solved: 3 Years, 1 Month ago
Would probably be better to do this:

ALTER TABLE `mybb_threads` CHANGE `notes` `notes` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL;

Allowing null makes more sense than setting a default of '0'. I think in newer versions of MySQL you can't set a default on text fields anyway, this confused me a while back as I used to set a default of '' and then it started erroring on newer versions, where what you need to do is just allow null.
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 2 Guest(s)