Describe the bug
I have a simple table defined as such
CREATE TABLEaccount( user_nameTINYINT(4) NOT NULL, emailDATE NOT NULL )
My code is also simple from the documentation
$database->insert("account", [ "user_name" => "foo", "email" => "foo@bar.com" ]);
I was expecting this to fail as neither user_name nor email fits the datatype defined in the database, but Medoo seems to always be casting (converting) the data types, so I get a row with 0, 0000-00-00
How can I force this to be an error?
I've tried adding this to the configuration, but still get success
'option' => [ PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION ]
Describe the bug I have a simple table defined as such
CREATE TABLE
account(
user_nameTINYINT(4) NOT NULL,
emailDATE NOT NULL )
My code is also simple from the documentation$database->insert("account", [ "user_name" => "foo", "email" => "foo@bar.com" ]);
I was expecting this to fail as neither user_name nor email fits the datatype defined in the database, but Medoo seems to always be casting (converting) the data types, so I get a row with 0, 0000-00-00 How can I force this to be an error? I've tried adding this to the configuration, but still get success
'option' => [ PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION ]
Information