Hi guys,
to bypass the "datapicker" issue that I'm not able to import into my code, because I'm ignorant and ashamed of it, I thought of a solution to this code:
Editor::inst( $db, 'scrivania1', 'id' )
->fields(
Field::inst( 'ddt' ),
Field::inst( 'cliente' ),
Field::inst( 'carico' ),
Field::inst( 'destinazione' ),
Field::inst( 'pr' ),
Field::inst( 'scarico' ),
Field::inst( 'scarico_m' ),
Field::inst( 'data_di_scarico' )
->validator( Validate::dateFormat( 'd/m/Y' ) )
->getFormatter( Format::dateSqlToFormat( 'd/m/Y' ) )
->setFormatter( Format::dateFormatToSql( 'd/m/Y' ) ),
Field::inst( 'epal' ),
Field::inst( 'ind' ),
Field::inst( 'perd' ),
Field::inst( 'dati_di_scarico' ),
Field::inst( 'drit' ),
Field::inst( 'trit' ),
Field::inst( 'dlinea' ),
Field::inst( 'tlinea' ),
Field::inst( 'note' ),
Field::inst( 'active' )
->setFormatter( function ( $val, $data, $opts ) {
return ! $val ? 0 : 1;
} )
)
I would add this clause:
->where ('data_di_scarico' = Current_Date)
But on phpmyadmin it works for me and from here it doesn't, why?
And return me the errorr TN/1