Hello,
I have a query that counts all recurring invoices that are due so far. Unfortunately I don’t understand the error exactly. Can you help me there?
// Load SerieBilling.
$this->SeriesInvoices = $this->fetchTable( 'SeriesInvoices' );
$today = new DateTime();
$today = $today->format( 'd-m-Y' ); //23-05-2023
$seriesinvoices = $this->SeriesInvoices->find( 'all' )->where( array('next_billing <=' => $today) ));
I get the following MySQL error:
Possibly related to PDOException: "SQLSTATE[HY000]: General error: 1525 Incorrect DATE value: '23-05-2023'"
The columns type for the field next_billing are date. Not datetime.
Can you help me?