Did you know how to fix ? I have try "1970-01-01 00:00:01" and "0000-00-00 00:00:00". Both not work#1067 - Invalid default value for 'last_update_date'
Thanks again
Did you know how to fix ? I have try "1970-01-01 00:00:01" and "0000-00-00 00:00:00". Both not work#1067 - Invalid default value for 'last_update_date'
That's why i do it manuallyInvalid query: Invalid default value for 'last_update_date'
Then as Pablo said, there may be an issue on the server side.Phillip911 wrote: Thu Mar 10, 2022 2:02 pm The file don't create it automatically, every time i login to the admin it always show this error
That's why i do it manuallyInvalid query: Invalid default value for 'last_update_date'
OK.Phillip911 wrote: Thu Mar 10, 2022 4:33 pm Nop, I'm using c-panel server. My server is Linux system. Now i'm waiting my hosting provider to answer me about the default time
Any idea about it ?The default date format in this server is same as Singapore time and date
No, I haven't try yet. But how to remove ?
Code: Select all
CREATE TABLE `CMS_PAGES` (
`id` int(10) UNSIGNED NOT NULL,
`category_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`content` text NOT NULL,
`home` tinyint(1) NOT NULL,
`visible` tinyint(1) NOT NULL,
`create_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`created_by` varchar(255) NOT NULL,
`last_update_date` timestamp NOT NULL,
`last_update_by` varchar(255) NOT NULL,
`views` int(11) NOT NULL,
`menu_index` int(11) NOT NULL,
`url` varchar(255) DEFAULT NULL,
`extra_data` varchar(255) DEFAULT NULL,
`title` varchar(100) DEFAULT NULL,
`description` varchar(255) DEFAULT NULL,
`keywords` varchar(255) DEFAULT NULL,
`seo_friendly_url` varchar(100) DEFAULT NULL,
`parent_id` int(11) DEFAULT NULL,
`search_index` tinyint(1) DEFAULT '1'
);
ALTER TABLE `CMS_PAGES`
ADD PRIMARY KEY (`id`);
Tried, still same errorPablo wrote: Fri Mar 11, 2022 7:20 amCode: Select all
CREATE TABLE `CMS_PAGES` ( `id` int(10) UNSIGNED NOT NULL, `category_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `content` text NOT NULL, `home` tinyint(1) NOT NULL, `visible` tinyint(1) NOT NULL, `create_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `created_by` varchar(255) NOT NULL, `last_update_date` timestamp NOT NULL, `last_update_by` varchar(255) NOT NULL, `views` int(11) NOT NULL, `menu_index` int(11) NOT NULL, `url` varchar(255) DEFAULT NULL, `extra_data` varchar(255) DEFAULT NULL, `title` varchar(100) DEFAULT NULL, `description` varchar(255) DEFAULT NULL, `keywords` varchar(255) DEFAULT NULL, `seo_friendly_url` varchar(100) DEFAULT NULL, `parent_id` int(11) DEFAULT NULL, `search_index` tinyint(1) DEFAULT '1' ); ALTER TABLE `CMS_PAGES` ADD PRIMARY KEY (`id`);
Pablo wrote: Fri Mar 11, 2022 7:36 am How can you have the same error?
There is no default date in the query anymore...
I have no idea about itThe default date format in this server is same as Singapore time and date
Maybe they can tell you?I have no idea about it
I think they also don't know what i'm asking and what is it..... RIP
Code: Select all
--
-- Table structure for table `CMS_PAGES`
--
CREATE TABLE `CMS_PAGES` (
`id` int(10) unsigned NOT NULL auto_increment,
`category_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`content` text NOT NULL,
`home` tinyint(1) NOT NULL default '0',
`visible` tinyint(1) NOT NULL,
`create_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`created_by` varchar(255) NOT NULL,
`last_update_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`last_update_by` varchar(255) NOT NULL,
`views` int(11) NOT NULL,
`menu_index` smallint(4) NOT NULL,
`url` varchar(255) NULL,
`extra_data` varchar(255) NULL,
`title` VARCHAR(100),
`description` VARCHAR(255),
`keywords` VARCHAR(255),
`seo_friendly_url` VARCHAR(100),
`parent_id` int(11) DEFAULT NULL,
`search_index` int(1) DEFAULT '1',
PRIMARY KEY (`id`));
--
-- Table structure for table `CMS_SEARCH_WORDMATCH`
--
CREATE TABLE `CMS_SEARCH_WORDMATCH` (
`page_id` int(10) unsigned NOT NULL,
`word_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`page_id`,`word_id`));
--
-- Table structure for table `CMS_SEARCH_WORDS`
--
CREATE TABLE `CMS_SEARCH_WORDS` (
`id` int(10) unsigned NOT NULL auto_increment,
`word` varchar(50) NOT NULL,
PRIMARY KEY (`id`)) ;
I have done created the SQL manually, while i try login to the cms admin. Get this error.Invalid query: Invalid default value for 'last_update_date'
Thanks for suggestionwwonderfull wrote: Sat Mar 12, 2022 10:47 am just dropping an opinion if you want you can get a webhost from hostinger(dot)com or whois(dot)com or even bluehost(dot)com all of them have a decent price with good and compatible service.
Sorry bro, i tried. Still not from me. But i found a solution.WWBman wrote: Sat Mar 12, 2022 12:51 pm The sql generated by wwb contains:
last_update_date TIMESTAMP NOT NULL,
so the issue could be the sql mode NO_ZERO_DATE.
I got the same error when using XAMPP.
In the SQL file my.ini there is:
sql_mode=NO_ZERO_IN_DATE,NO_ZERO_DATE,NO_ENGINE_SUBSTITUTION
When I changed this to:
sql_mode=NO_ZERO_IN_DATE,NO_ENGINE_SUBSTITUTION
the table was created successfully with no error message.
If you can find the equivalent file on your server and remove the NO_ZERO_DATE then this might solve the problem.
BUT, I am no expert in SQL options and although this seems to work on my XAMPP system, it may not be applicable on a 'live' server.
On my Linux server I do not get the error message.