Page 1 of 1

MySQL Query Failed

Posted: 23 Oct 2018, 04:09
by copiousquirk
MySQL Query Failed: Incorrect datetime value: '' for column 'date_available' at row 1

Hi there ,

I'm trying to restore my backup data file into a new hosting online and have downloaded the newest version of OpenCATS. However, i'm getting the above error. I'm not tech savvy but can understand certain concepts. To my understanding, the old data is different or has a column that the new version doesnt have, or the format of the date is wrong? is that a way to fix massive amount of data somewhere so it is compatible with the newer version?

Can someone help me with this?

Re: MySQL Query Failed

Posted: 23 Oct 2018, 14:53
by RussH
Hi,

I'm not sure what steps you've followed - or if you're still on a supportable level of PHP & MySQL.. But I'd install to the same version as you're currently running, to prove it all works, then upgrade to current.

Re: MySQL Query Failed

Posted: 25 Oct 2018, 18:41
by copiousquirk
I've just tried reinstalling with the old version to restore from backup. I got the same message and also the below. any ideas?
Loading Data - Unknown Data in the Database

The installer has scanned the database and found unknown tables in the database. This could indicate that another application has been installed in the database beforehand.

View a list of tables in the database
access_level, activity, activity_type, attachment, calendar_event, calendar_event_type, candidate,
Please remove all of the-non OpenCATS tables to continue.

Re: MySQL Query Failed

Posted: 25 Oct 2018, 18:44
by copiousquirk
Installing a NEW installation was fine.

BUT, When i tried installing the demo version, I received the below error
Query Error -- Please Report This Bug!


MySQL Query Failed: Incorrect integer value: '' for column 'added_by' at row 1

INSERT INTO `candidate_joborder` VALUES
('1','20','3','201','500','0000-00-00 00:00:00','2007-01-17 14:29:01','2007-01-17 14:32:03','5',''),
('2','61','3','201','300','0000-00-00 00:00:00','2007-01-17 14:29:15','2007-01-17 14:31:43','4',''),
('3','68','3','201','200','0000-00-00 00:00:00','2007-01-17 14:29:29','2007-01-17 14:31:00','4',''),
('4','26','3','201','100','0000-00-00 00:00:00','2007-01-17 14:29:44','2007-01-17 14:29:44','2',''),
('5','52','3','201','500','0000-00-00 00:00:00','2007-01-17 14:29:58','2007-01-17 14:32:45','5',''),
('6','37','3','201','600','0000-00-00 00:00:00','2007-01-17 14:32:19','2007-01-17 14:33:05','5',''),
('7','35','1','201','400','0000-00-00 00:00:00','2007-01-17 15:13:28','2007-01-17 15:14:23','4',''),
('8','56','2','201','400','0000-00-00 00:00:00','2007-01-17 15:15:25','2007-01-17 15:16:05','5','')

Re: MySQL Query Failed

Posted: 27 Oct 2018, 00:10
by RussH
Since the app was created, 'No Zero Date' is part of 'strict mode' in the default install for >= MySQL 5.7

You can ignore this by reconfiguring the setup https://www.linode.com/community/questi ... trict-mode

Re: MySQL Query Failed

Posted: 31 Oct 2018, 15:43
by RussH
Hi,

I fixed the test data so that it's compliant with strict mode and also added in some missing features introduced since the test data was created (candidate tags).

it's a single file, https://github.com/opencats/OpenCATS/pull/400 it's added to the development branch right now.