MySQL Forums
Forum List  »  Connector/Python

Re: script crashes on last day of month but works every other day
Posted by: neil black
Date: May 01, 2022 12:31PM

Hi thanks you for the reply.
I just find it odd that it only crashes on the last day of the month.

My DB looks like this

'2022-05-02', '0', '0'
'2022-05-01', '0', '0'
'2022-04-30', '0', '0'
'2022-04-29', '0', '0'
'2022-04-28', '0', '0'

if the date today is 2022-05-01
select count(*) from meter where date = current_date() + 1;
returns 1 as a result which is correct

the same query on 2022-04-30
select count(*) from meter where date = current_date() + 1;
return 0 yet 2022-05-01 is present
if I try to add that date with a input query i get a duplicate entry error

Options: ReplyQuote


Subject
Written By
Posted
Re: script crashes on last day of month but works every other day
May 01, 2022 12:31PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.