After typing a reply in the post, SMF writes me an error:
Field 'hiddenInfo' doesn't have a default value
File: /home/user01443/roomxxx.com/www/Sources/Subs-Post.php
Line: 1817
Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.15, while your database is at version 2.0.4. The above error might possibly go away if you execute the latest version of upgrade.php.
How can I fix it?
Thank you
go into the database with phpmyadmin and give that column a default value (usually NULL)
It is set to 0 and probably correct.
There will be no mistake.
Thanks
that is untrue....
if the default should be NULL, that is different from a default of 0 and may have very different results.
Thanks.
No. The default value is 0.
https://www.essentialsql.com/get-ready-to-learn-sql-server-what-is-a-null-value/
Quote from: maav on August 23, 2019, 01:12:07 AM
Thanks.
No. The default value is 0.
How did you arrive at that?
I looked at the table.
Thank you
*shrug* I still wouldn't make that assumption, even after looking at the table, the only way I'd make that assumption is by looking at and understanding the code. I've seen weirder things where the table nearly always had one value but that it wasn't the default and things broke by making it the default.
The recommendation to make it null is much safer for future reference.
https://www.oreilly.com/library/view/mysql-cookbook/0596001452/ch08s05.html
What do you think phpMyAdmin does under the hood?
Anyway the debate is not "how to set a default" as such, but rather setting an explicit default vs setting no default by way of null.
Kindred is right. I looked at the problem again and the item was not set.
I set up and the error is already OK.
Thank you