Greetings,
I am using the xataface depselect module. I have put the modules in my xataface directory which is outside my site directory i.e.
xampp/htdocs/sitename/xata/modules/depselect
I have added this in my conf.ini file as well.
[_modules]
modules_depselect=modules/depselect/depselect.php
I have created two tables namely, provinces, districts and i will extend to more if it works, the structure and it's dumb data is given below:
CREATE TABLE IF NOT EXISTS `provinces` (
`province_id` int(11) NOT NULL AUTO_INCREMENT,
`province_name` varchar(64) NOT NULL,
`province_code` varchar(32) DEFAULT NULL,
PRIMARY KEY (`province_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;
--
-- Dumping data for table `provinces`
--
INSERT INTO `provinces` (`province_id`, `province_name`, `province_code`) VALUES
(1, 'Khyber Pakhtoonkhwa', 'KPK'),CREATE TABLE IF NOT EXISTS `provinces` (
`province_id` int(11) NOT NULL AUTO_INCREMENT,
`province_name` varchar(64) NOT NULL,
`province_code` varchar(32) DEFAULT NULL,
PRIMARY KEY (`province_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;
--
-- Dumping data for table `provinces`
--
INSERT INTO `provinces` (`province_id`, `province_name`, `province_code`) VALUES
(1, 'Khyber Pakhtoonkhwa', 'KPK'),
And the districts table is:
CREATE TABLE IF NOT EXISTS `districts` (
`distt_id` int(11) NOT NULL AUTO_INCREMENT,
`province_id` int(11) DEFAULT NULL,
`distt_name` varchar(64) DEFAULT NULL,
`distt_code` varchar(32) DEFAULT NULL,
PRIMARY KEY (`distt_id`),
KEY `province_id` (`province_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
--
-- Dumping data for table `districts`
--
INSERT INTO `districts` (`distt_id`, `province_id`, `distt_name`, `distt_code`) VALUES
(1, 1, 'Peshawar', 'Pesh'),
(2, 1, 'Kohat', 'Ko'),
(3, 2, 'Lahore', 'Lh');
--
-- Constraints for dumped tables
--
--
-- Constraints for table `districts`
--
ALTER TABLE `districts`
ADD CONSTRAINT `districts_ibfk_1` FOREIGN KEY (`province_id`) REFERENCES `provinces` (`province_id`);
but when I go to the browser and give the the following url: http://demo.cvp.org/grants/index.php?-a ... =provinces
it only shows the province table fields and not the districts table. you can see the form view in attached snapshot as well. my fields.ini file for provinces is like this.
[province_id]
widget:type=depselect
widget:table=provinces
[distt_id]
widget:type=depselect
widget:table=districts
widget:filters:province_id="$province_id"
I have created tables/provinces directory in tables directory with provinces.p not the tables/districts directory yet.
kindly lead me, and tell me what i am doing wrong.
looking forward for your reply.