gutiersa wrote on Tuesday, December 20, 2011:
Thanks for your reply,
Yes I thought of that so I made the table same as the test table and the problem did not go away. this is what the export looked like in the test machine:
CREATE TABLE IF NOT EXISTS `categories` (
`id` int(11) NOT NULL DEFAULT ‘0’,
`name` varchar(255) DEFAULT NULL,
`value` varchar(255) DEFAULT NULL,
`parent` int(11) NOT NULL DEFAULT ‘0’,
`lft` int(11) NOT NULL DEFAULT ‘0’,
`rght` int(11) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (`id`),
KEY `parent` (`parent`),
KEY `lft` (`lft`,`rght`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
- Dumping data for table `categories`
-
INSERT INTO `categories` (`id`, `name`, `value`, `parent`, `lft`, `rght`) VALUES
(1, ‘Categories’, ‘’, 0, 0, 39),
(2, ‘Lab Report’, ‘’, 1, 1, 2),
(3, ‘Medical Record’, ‘’, 1, 3, 4),
(4, ‘Patient Information’, ‘’, 1, 5, 10),
(5, ‘Patient ID card’, ‘’, 4, 6, 7),
(6, ‘Patient Photograph’, ‘’, 1, 11, 12),
(7, ‘Diagnostics’, ‘’, 1, 13, 14),
(8, ‘Consults’, ‘’, 1, 15, 16),
(9, ‘Correspondence’, ‘’, 1, 17, 18),
(10, ‘Other’, ‘’, 1, 19, 20),
(11, ‘Consents’, ‘’, 4, 8, 9),
(12, ‘Hospital/Old records’, ‘’, 1, 21, 22),
(13, ‘Referrals’, ‘’, 1, 23, 24),
(14, ‘Deleted’, ‘’, 1, 25, 26),
(15, ‘Advance Directive’, ‘’, 1, 27, 34),
(16, ‘Do Not Resuscitate Order’, ‘’, 15, 28, 29),
(17, ‘Durable Power of Attorney’, ‘’, 15, 30, 31),
(18, ‘Living Will’, ‘’, 15, 32, 33),
(19, ‘CCR’, ‘’, 1, 35, 36),
(20, ‘CCD’, ‘’, 1, 37, 38);
this is what it looked like in the production server:
CREATE TABLE IF NOT EXISTS `categories` (
`id` int(11) NOT NULL DEFAULT ‘0’,
`name` varchar(255) DEFAULT NULL,
`value` varchar(255) DEFAULT NULL,
`parent` int(11) NOT NULL DEFAULT ‘0’,
`lft` int(11) NOT NULL DEFAULT ‘0’,
`rght` int(11) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (`id`),
KEY `parent` (`parent`),
KEY `lft` (`lft`,`rght`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
- Dumping data for table `categories`
-
INSERT INTO `categories` (`id`, `name`, `value`, `parent`, `lft`, `rght`) VALUES
(1, ‘Categories’, ‘’, 0, 0, 47),
(2, ‘Lab Report’, ‘’, 1, 1, 2),
(3, ‘Medical Record’, ‘’, 1, 3, 4),
(4, ‘Patient Information’, ‘’, 1, 5, 10),
(5, ‘Patient ID card’, ‘’, 4, 6, 7),
(6, ‘Patient Photograph’, ‘’, 1, 11, 12),
(7, ‘Diagnostics’, ‘’, 1, 13, 14),
(8, ‘Consults’, ‘’, 1, 15, 16),
(9, ‘Correspondence’, ‘’, 1, 17, 18),
(10, ‘Other’, ‘’, 1, 19, 20),
(11, ‘Consents’, ‘’, 4, 8, 9),
(12, ‘Hospital/Old records’, ‘’, 1, 21, 22),
(13, ‘Referrals’, ‘’, 1, 23, 24),
(14, ‘Deleted’, ‘’, 1, 25, 26),
(15, ‘Advance Directive’, ‘’, 1, 27, 34),
(16, ‘Do Not Resuscitate Order’, ‘’, 15, 28, 29),
(17, ‘Durable Power of Attorney’, ‘’, 15, 30, 31),
(18, ‘Living Will’, ‘’, 15, 32, 33),
(19, ‘CCR’, ‘’, 1, 35, 36),
(20, ‘CCD’, ‘’, 1, 37, 38),
(21, ‘Advance Directive’, ‘’, 1, 39, 46),
(22, ‘Advance Directive’, ‘’, 1, 47, 54);
The only difference was the first row in the production server had a 47 for the rght field, and rows 21 and 22 were not present.
I do believe this is a database issue. The test server should have been brought up to date (ie rows 21 and 22 added) when I updated and patched the database.
Now the production server has a 39 for row 1 field rght, and rows 21 and 22.
Sandra
PS. test server is 64 bit laptop, and production is 32 bit desktop