Re: MySQL import error

Open to all! Ask other shopowners for help.
Post Reply
User avatar
tessthepup
Certified Developer
Posts: 381
Joined: Mon Mar 01, 2021 5:55 pm
Phoenix Version:
Has thanked: 47 times
Been thanked: 62 times

Re: MySQL import error

Post by tessthepup »

Hi Guys,

I am in the process of changing hosts and moving to 20i.

I am trying to import my zipped database backup into phpmyadmin but receiving this error. The table is not standard Phoenix Cart its an import module I am working on.
#1067 - Invalid default value for 'created_at'
This is the sql. I have googled the error but can not seem to find a fix that works.
CREATE TABLE store_manual_categories ( id int(11) NOT NULL AUTO_INCREMENT, name varchar(255) NOT NULL, parent_id int(11), feed_category_path text, created_at timestamp default 'current_timestamp()', PRIMARY KEY (id), KEY idx_parent_id (parent_id), KEY idx_name (name));
Any help would be appreciated.

Thanks

Mark


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
burt
Core Team
Posts: 4550
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: MySQL import error

Post by burt »

What is

'current_timestamp()'

?

Change it to

CURRENT_TIMESTAMP
I am not here to build for you.
I am here to build with you. Let's help each other.
User avatar
tessthepup
Certified Developer
Posts: 381
Joined: Mon Mar 01, 2021 5:55 pm
Phoenix Version:
Has thanked: 47 times
Been thanked: 62 times

Re: MySQL import error

Post by tessthepup »

burt wrote: Sun Aug 10, 2025 1:33 pm What is

'current_timestamp()'

?

Change it to

CURRENT_TIMESTAMP
@burt thanks Gary not sure why it did not work when I did it before but hey ho it works now lol


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply