by computergenius » 09. April 2021 20:03
Ok, more details:
I am using Windows 10 Pro x64.
The installation is from
xampp-windows-x64-7.4.16-0-VC15-installer.exe
It's a new installation, to replace a damaged earlier version. The earlier version was perhaps from Sept or Oct 2020, but I can't be sure.
The example that I have been using is the payments table, "create script" below, which used to be used for PayPal (hence the name).
There are many "implicit" defaults required, for example an int should give a 0, and no error message.
Take the line:
INSERT INTO paypal SET pplcustom = 99999
which just inserts one field, and expects all the others to default.
I have remmed (#) the line in my.ini
#sql_mode=NO_ZERO_IN_DATE,NO_ZERO_DATE,NO_ENGINE_SUBSTITUTION
With the line active in my.ini, I see a list of all the "missing" implicit defaults.
With the line remmed, I only see the first missing implicit default. But my system still reports that there was an error. I need it to insert defaults without error message.
Error Code: 1364
Field '(fieldname)' doesn't have a default value
With the previous version of xampp that I was using, it was working fine, but I can't see what version it was, as it was damaged, and hence the reason for the upgrade to the latest version. So I don't even know which version to go back to.
I need the commands give similar results on the xampp (local, test) version, and the live version. That is, use all implicit defaults.
CREATE TABLE `paypal` (
`pplID` int(11) NOT NULL AUTO_INCREMENT,
`pplmc_gross` decimal(7,2) NOT NULL,
`pplinvoice` char(16) NOT NULL,
`pplsettle_amount` decimal(7,2) NOT NULL DEFAULT 74.00,
`pplprotection_eligibility` char(10) NOT NULL,
`ppladdress_status` char(10) NOT NULL,
`pplpayer_id` char(16) NOT NULL,
`ppladdress_street` text NOT NULL,
`pplpayment_date` char(25) NOT NULL,
`pplunix_date` int(11) DEFAULT NULL,
`ppldate` datetime NOT NULL,
`pplpayment_status` char(12) NOT NULL,
`pplcharset` varchar(20) NOT NULL,
`ppladdress_zip` char(10) NOT NULL,
`pplfirst_name` varchar(20) NOT NULL,
`pplmc_fee` decimal(5,2) NOT NULL,
`ppladdress_country_code` char(3) NOT NULL,
`pplexchange_rate` char(10) NOT NULL,
`ppladdress_name` varchar(40) NOT NULL,
`pplnotify_version` char(5) NOT NULL DEFAULT 'Moka1',
`pplsettle_currency` decimal(7,2) NOT NULL,
`pplcustom` text NOT NULL,
`pplpayer_status` char(12) NOT NULL,
`pplbusiness` varchar(50) NOT NULL,
`ppladdress_country` varchar(20) NOT NULL,
`ppladdress_city` varchar(20) NOT NULL,
`pplquantity` smallint(6) NOT NULL,
`pplverify_sign` char(56) NOT NULL,
`pplpayer_email` varchar(50) NOT NULL,
`ppltxn_id` varchar(20) NOT NULL,
`pplpayment_type` char(10) NOT NULL,
`ppllast_name` varchar(20) NOT NULL,
`ppladdress_state` varchar(30) NOT NULL,
`pplreceiver_email` varchar(50) NOT NULL,
`pplpayment_fee` char(10) NOT NULL,
`pplreceiver_id` varchar(50) NOT NULL,
`ppltxn_type` char(16) NOT NULL,
`pplitem_name` varchar(50) NOT NULL DEFAULT 'CoachMeFree Subscription',
`pplmc_currency` char(3) NOT NULL DEFAULT 'EUR',
`pplitem_number` char(20) NOT NULL,
`pplresidence_country` char(3) NOT NULL,
`ppltransaction_subject` varchar(20) NOT NULL,
`pplpayment_gross` char(10) NOT NULL,
`pplipn_track_id` char(16) NOT NULL,
PRIMARY KEY (`pplID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1