With a bit more investigation, I decided to do a show if on the hidden field that is populating b_bookingid and it seems that b_booking id MUST have a value, even if it's '0' rather than be blank when being posted to the DB.
Now, I have other fields that are INT within the DB table that have no interaction from the insert page, however, it would seem the error is now being caused on a DB column (within the same table) called b_totalcustomers! As I say, this isn't being submitted to by this insert, and therefore I can only assume that the DB is causing the problem.
Setting INT to a default of '0' has no effect, it seems I have to actually submit content to every INT column even I am expecting other pages in the CMS to handle these columns for admin/business requirements.
Have you got any idea of how to overcome this?
This is my DB code:
CREATE TABLE `tbl_bookings` (
`b_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`b_bookingid` int(11) DEFAULT '0' COMMENT 'Copy of b_id for extra person',
`b_tripid` int(11) DEFAULT '0' COMMENT 'ID of Tour booked',
`b_title` varchar(25) DEFAULT NULL,
`b_first` varchar(255) DEFAULT NULL,
`b_last` varchar(255) DEFAULT NULL,
`b_dob` varchar(100) DEFAULT NULL,
`b_nationaility` varchar(100) DEFAULT NULL,
`b_gender` varchar(12) DEFAULT NULL,
`b_tel` varchar(20) DEFAULT NULL,
`b_mob` varchar(20) DEFAULT NULL,
`b_email` varchar(100) DEFAULT NULL,
`b_password` varchar(100) DEFAULT NULL,
`b_address` text,
`b_notes` text,
`b_emergencyname` varchar(255) DEFAULT NULL,
`b_emergencytel` varchar(20) DEFAULT NULL,
`b_roomtype` int(1) DEFAULT '0',
`b_promo` varchar(50) DEFAULT NULL,
`b_hire` int(2) DEFAULT '0',
`b_transfer` int(2) DEFAULT '0',
`b_referrer` int(2) DEFAULT '0',
`b_referrerinfo` varchar(150) DEFAULT '0',
`b_totalcustomers` int(2) DEFAULT '0',
`b_deposit` decimal(10,2) DEFAULT NULL,
`b_balance` decimal(10,2) DEFAULT NULL,
`b_bookdate` datetime DEFAULT CURRENT_TIMESTAMP,
`b_timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`b_id`)
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=latin1;