I have two tables in which I insert records. I am using PHP to execute an SQL query to perform an operation. When I perform an insert operation, I insert 10,000 new records into two tables. One table completes the insertion process successfully in all operations, and the second table completes the first insertion operation, but stops the insertion in the second operation, when it reaches 6.384, it will stop inserting new records.
The table structure for the two tables is shown below:
CREATE TABLE `client_package` (
`package_id` varchar(15) NOT NULL,
`client_id` int(11) NOT NULL,
`subaccount_id` int(11) NOT NULL,
`receiver_name` varchar(50) NOT NULL,
`receiver_address` varchar(100) NOT NULL,
`receiver_city` varchar(20) NOT NULL,
`receiver_state` int(3) NOT NULL,
`receiver_phone` varchar(20) NOT NULL,
`receiver_email` varchar(40) NOT NULL,
`shipment_date` varchar(15) NOT NULL,
`delivery_date` varchar(15) NOT NULL,
`item_type` varchar(30) NOT NULL,
`item_weight` varchar(20) NOT NULL,
`item_quantity` varchar(15) NOT NULL,
`package_status` int(3) NOT NULL,
`date` varchar(12) NOT NULL,
PRIMARY KEY (`package_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `package_tracking` (
`id` int(11) NOT NULL auto_increment,
`package_id` varchar(15) NOT NULL,
`package_status` int(3) NOT NULL,
`package_note` varchar(100) NOT NULL,
`update_time` varchar(15) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
There is a client_package in the table asking me the problem. In addition, before inserting a new entry into the client_package table, I first check if package_id already generated exists, and if it creates another one. I do not know if this is really a problem.
Thanks in advance.