How to fix sql error top_last_post_subject on phpbb3

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Post Reply
hvlabs
Registered User
Posts: 1
Joined: Sat May 23, 2009 11:50 am

How to fix sql error top_last_post_subject on phpbb3

Post by hvlabs »

I'm posting here because for some bizzare reason you've locked the proper forum and I think this would be useful to everyone.

I was getting the problem below:

SQL ERROR [ mysql4 ]
Field 'topic_last_post_subject' doesn't have a default value [1364]

SQL

INSERT INTO phpbb3_topics (topic_poster, topic_time, forum_id, icon_id, topic_approved, topic_title, topic_first_poster_name, topic_first_poster_colour, topic_type, topic_time_limit, topic_attachment) VALUES (2, 1233814166, 13, 0, 1, 'test', 'Rob', 'AA0000', 0, 0, 0)

BACKTRACE

FILE: includes/db/mysql.php
LINE: 174
CALL: dbal->sql_error()

FILE: includes/functions_posting.php
LINE: 1850
CALL: dbal_mysql->sql_query()

FILE: posting.php
LINE: 1001
CALL: submit_post()

---

I fixed it by going to myphpadmin (usually provided by your isp provider), choose the table "php_topics" from the left hand side. choose the "structure" tab at the top of the new page. Then scroll down to find 'topic_last_post_subject' . Select the pen item "change" from the right hand side of top_last_post_subject.
In the new window, select type and "VARCHAR" from the drop down menu, then enter "255" in the Length/Value section and finally under Default, type the letter "a".

Press save and that should be it. Hope it works for you!! :D

Oliver
Last edited by darcie on Sat May 23, 2009 7:09 pm, edited 1 time in total.
Reason: unnecessary link removed
User avatar
darcie
Community Team
Community Team
Posts: 189
Joined: Mon Mar 12, 2007 7:32 pm
Location: Davis, California
Contact:

Re: How to fix sql error top_last_post_subject on phpbb3

Post by darcie »

The "proper" forum for posting support topics is actually http://www.phpbb.com/community/viewforum.php?f=46. The support forum here is closed, as it is only temporarily opened when our main support site is not available.

Also, there is a knowledge base article written to properly solve this as well at the main site: Knowledge Base - Doesn't have a default value errors

Hope these links help you in the future! :D
Post Reply