I have two tables that i am inserting records into. I am using PHP to execute the sql query to perform the operation. When performing the insert operation, i insert 10,000 new records in two tables. One table completes insert process successfully on all operations while the second table completes the first insert operation but stops the insertion on the second operation when it gets to 6,384 it will stop inserting new records.
below is the table structure for the two tables:
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;
The table giving me the problem is client_package. Also, before inserting a new record in client_package table, i first check if the generated package_id already exist and if it does i generate another one. I don't know if thats wot is actually causing the problem.
Thanks in advance.