:::
XOOPS使用討論區

Tad News4.16安裝完後,發布文章出現資料庫問題

discuss pic 2020-01-02 15:17:15

請問老師如何解決?

哎呀!資料庫有點問題呢!

insert into x194_tad_news (ncsn,news_title,news_content,start_day,end_day,enable,uid,passwd,enable_group,prefix_tag,always_top,always_top_date,have_read_group) values('3','test','

test

','2020-01-02 15:15:08','0000-00-00 00:00:00','1','1','','','','0','2020-01-09 15:15:08','')
Incorrect datetime value: '0000-00-00 00:00:00' for column 'end_day' at row 1
/var/www/html/modules/tadnews/class/Tadnews.php:2283

discuss pic 2020-01-02 16:07:25
tad
將資料庫的嚴格模式關閉即可
discuss pic 2020-01-03 10:53:36

TAD老師已經將資料庫嚴格模式關閉,還是出現上面的現象。

discuss pic 2020-01-03 10:58:44
tad

請把 NO_ZERO_DATE  也去掉

discuss pic 2020-01-04 13:30:35

感謝TAD老師,已解決問題了。用下列的方式將資料庫的嚴格模式關閉

1. To Disable Strict Mode via SQL:

You can disable strict mode on your MySQL server by running the following command on your Linode's command line:

$ mysql -u root -p -e "SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION';" 

You can set other values for sql_mode as well. See sysvar sql_mode in the MySQL Documentation for a list.

Then, you can verify that the mode is set by running the following:

$ mysql -u root -p -e "SELECT @@GLOBAL.sql_mode;"
:::

搜尋

QR Code 區塊

https%3A%2F%2Ftad0616.cp22.secserverpros.com%2Fmodules%2Ftad_discuss%2Fdiscuss.php%3FBoardID%3D17%26DiscussID%3D34288

線上使用者

62人線上 (46人在瀏覽討論留言)

會員: 0

訪客: 62

更多…