글쓰기 이런 오류는 왜 뜨는건가요?
본문
insert into g5_write_review set wr_num = '-70', wr_reply = '', wr_comment = 0, ca_name = '', wr_option = ',,', wr_subject = '1111', wr_content = '13123', wr_link1 = '', wr_link2 = '', wr_link1_hit = 0, wr_link2_hit = 0, wr_hit = 0, wr_good = 0, wr_nogood = 0, mb_id = '', wr_password = '*89C6B530AA78695E257E55D63C00A6EC9AD3E977', wr_name = '2323', wr_email = '', wr_homepage = '', wr_datetime = '2021-07-12 11:08:15', wr_last = '2021-07-12 11:08:15', wr_ip = '222.108.58.8', wr_1 = '', wr_2 = '', wr_3 = '', wr_4 = '', wr_5 = '', wr_6 = '', wr_7 = '', wr_8 = '', wr_9 = '', wr_10 = ''
1364 : Field 'wr_comment_reply' doesn't have a default value
error file : /bbs/write_update.php
답변 3
서버제로님 처럼 처리하면 되겠지만
mysql 서버를 적용 못하실경우
$wr_comment_reply = $wr_comment_reply ? $wr_comment_reply : '0';
!-->
sql_mode를 변경하는 방법도 있습니다.
https://stackoverflow.com/questions/25865104/field-id-doesnt-have-a-default-value/42941784
https://stackoverflow.com/questions/15438840/mysql-error-1364-field-doesnt-have-a-default-values