searchform error with relationships
Posted: Tue Jul 13, 2010 9:42 am
Hi,
Using v1.2.5, I have the following error doing a simple search in the find tab:
Thanks for some insight!
Here are my table constructs:
volunteers table
volunteer hours table
And relationships.ini file for the volunteers table:
I also have a __sql__ at the beginning of my fields.ini (for volunteers table)...
Using v1.2.5, I have the following error doing a simple search in the find tab:
- Code: Select all
Failed to get field Volunteer_Hours/ID: 2Failed to get field Volunteer_Hours/topic: 2Failed to get field Volunteer_Hours/numofhours: 2Failed to get field Volunteer_Hours/notes: 2
Warning: Cannot modify header information - headers already sent by (output started at /var/www/infobase/xataface/Dataface/SearchForm.php:332) in /var/www/infobase/xataface/Dataface/SearchForm.php on line 354
Thanks for some insight!
Here are my table constructs:
volunteers table
- Code: Select all
CREATE TABLE IF NOT EXISTS `volunteers` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`peopleID` int(11) NOT NULL,
`occupation` varchar(50) DEFAULT NULL,
`intakedate` date NOT NULL,
`achievedhrs` tinyint(4) DEFAULT NULL,
`areasofinterest` varchar(50) DEFAULT NULL,
`otherinterest` varchar(150) DEFAULT NULL,
`languages` varchar(100) DEFAULT NULL,
`availability` varchar(200) DEFAULT NULL,
`howhearcawst` text,
`whycawst` text,
`notes` text,
`active` varchar(20) DEFAULT NULL,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ;
volunteer hours table
- Code: Select all
CREATE TABLE IF NOT EXISTS `volunteerhours` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`volunteerID` int(11) NOT NULL,
`deptsID` int(11) NOT NULL,
`topic` varchar(50) DEFAULT NULL,
`numofhours` int(11) NOT NULL,
`notes` text,
`month` enum('January','February','March','April','May','June','July','August','September','October','November','December') DEFAULT NULL,
`year` int(4) NOT NULL DEFAULT '2010',
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;
And relationships.ini file for the volunteers table:
- Code: Select all
[Volunteer Hours]
volunteerhours.volunteerID = "$ID"
I also have a __sql__ at the beginning of my fields.ini (for volunteers table)...
- Code: Select all
__sql__ = "SELECT v.*, sum(h.numofhours) as thours FROM volunteers v LEFT JOIN volunteerhours h ON h.volunteerID=v.ID GROUP BY v.ID"