MySQL Query Failed

Please describe the issue you're having
If you accept the answer, please mark the topic as [SOLVED] by clicking the tick.

Moderators: RussH, cptr13

Forum rules
Just please remember to play nicely once you walk through the door. You can disagree with us, or any other commenters in this forum, but respect our space and keep your comments directed to the topic at hand.
Post Reply
copiousquirk
Posts: 9
Joined: 25 Jan 2018, 17:05
what is two(2) plus three(3) ?: 5

MySQL Query Failed

Post by copiousquirk » 23 Oct 2018, 04:09

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?

User avatar
RussH
Site Admin
Posts: 810
Joined: 12 Apr 2008, 08:28
what is two(2) plus three(3) ?: 5
Location: UK
Contact:

Re: MySQL Query Failed

Post by RussH » 23 Oct 2018, 14:53

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.
RussH

Report your issues and feature requests;
https://github.com/opencats/opencats/issues

Please CLICK THE TICK to accept the answer!

copiousquirk
Posts: 9
Joined: 25 Jan 2018, 17:05
what is two(2) plus three(3) ?: 5

Re: MySQL Query Failed

Post by copiousquirk » 25 Oct 2018, 18:41

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.

copiousquirk
Posts: 9
Joined: 25 Jan 2018, 17:05
what is two(2) plus three(3) ?: 5

Re: MySQL Query Failed

Post by copiousquirk » 25 Oct 2018, 18:44

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','')

User avatar
RussH
Site Admin
Posts: 810
Joined: 12 Apr 2008, 08:28
what is two(2) plus three(3) ?: 5
Location: UK
Contact:

Re: MySQL Query Failed

Post by RussH » 27 Oct 2018, 00:10

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
RussH

Report your issues and feature requests;
https://github.com/opencats/opencats/issues

Please CLICK THE TICK to accept the answer!

User avatar
RussH
Site Admin
Posts: 810
Joined: 12 Apr 2008, 08:28
what is two(2) plus three(3) ?: 5
Location: UK
Contact:

Re: MySQL Query Failed

Post by RussH » 31 Oct 2018, 15:43

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.
RussH

Report your issues and feature requests;
https://github.com/opencats/opencats/issues

Please CLICK THE TICK to accept the answer!

Post Reply