To save card holders’ details to MySQL prepare a table with the following fields:
CREATE TABLE `cardholder` (
`idCardHolder` int NOT NULL AUTO_INCREMENT,
`readID` varchar(45) DEFAULT NULL,
`cardReadDate` date DEFAULT NULL,
`cardReadTime` time DEFAULT NULL,
`cardReadDateTime` datetime DEFAULT NULL,
`fullNameEnglish` varchar(100) DEFAULT NULL,
`fullNameArabic` varchar(100) DEFAULT NULL,
`firstNameEnglish` varchar(45) DEFAULT NULL,
`lastNameEnglish` varchar(45) DEFAULT NULL,
`firstNameArabic` varchar(45) DEFAULT NULL,
`lastNameArabic` varchar(45) DEFAULT NULL,
`idNumber` varchar(45) DEFAULT NULL,
`issueDate` date DEFAULT NULL,
`expiryDate` date DEFAULT NULL,
`passportNumber` varchar(45) DEFAULT NULL,
`passportIssueDate` date DEFAULT NULL,
`passportExpiryDate` date DEFAULT NULL,
`residencyNumber` varchar(45) DEFAULT NULL,
`residencyExpiryDate` varchar(45) DEFAULT NULL,
`homeMobilePhoneNumber` varchar(45) DEFAULT NULL,
`workMobilePhoneNumber` varchar(45) DEFAULT NULL,
`homeEmail` varchar(45) DEFAULT NULL,
`workEmail` varchar(45) DEFAULT NULL,
`dateOfBirth` date DEFAULT NULL,
`gender` char(1) DEFAULT NULL,
`nationalityEnglish` varchar(45) DEFAULT NULL,
`nationalityArabic` varchar(45) DEFAULT NULL,
`occupationTypeEnglish` varchar(45) DEFAULT NULL,
`occupationTypeArabic` varchar(45) DEFAULT NULL,
`sponsorName` varchar(45) DEFAULT NULL,
`homeCityDescEnglish` varchar(45) DEFAULT NULL,
`homeCityDescArabic` varchar(45) DEFAULT NULL,
PRIMARY KEY (`idCardHolder`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci;
Then, go to the MySQL tab in Options, check the Export to MySQL checkbox and fill the database details. Restart the Glass-Reader application.
When an ID card gets scanned a new row will be inserted into the MySQL table.