Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, November 11, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  data entry / multiple lookups

phpMyEdit General     data entry / multiple lookups
Post new topic   Reply to topic    
 
scristaldi     Joined: 16 May 2007   Posts: 1  
Post Posted: 2007-05-16 00:19
Back to top  Reply with quote     

I have 3 tables. I am trying to use myedit5.6 to create a data entry page.

mh_id ....... blank/auto_increment
member_id is field wanted for input, BUT, want member_fname and member_lname to display for user
selection.

cccb_id is field wanted for input, BUT, want cccb_name to display for user for selection.

title_id is field wanted for input, BUT, want title_name to display for user selection.

date start Is there a way to (template?) date format?

date end Is there a way to (template?) date format?

Problems are as follows:


1. member_history table

DROP TABLE IF EXISTS `member_history`;
CREATE TABLE `member_history` (
`mh_id` int(6) unsigned zerofill NOT NULL auto_increment,
`member_id` int(4) unsigned zerofill NOT NULL,
`cccb_id` int(5) unsigned zerofill NOT NULL,
`title_id` int(5) unsigned zerofill NOT NULL,
`date_start` date default NULL,
`date_end` date default NULL,
`term` int(4) default NULL,
PRIMARY KEY (`mh_id`),
KEY `member_id` (`member_id`),
KEY `cccb_id` (`cccb_id`),
KEY `title_id` (`title_id`),
CONSTRAINT `member_history_ibfk_1` FOREIGN KEY (`member_id`) REFERENCES `member` (`member_id`) ON

UPDATE CASCADE,
CONSTRAINT `member_history_ibfk_2` FOREIGN KEY (`cccb_id`) REFERENCES `cccb` (`cccb_id`) ON UPDATE

CASCADE,
CONSTRAINT `member_history_ibfk_3` FOREIGN KEY (`title_id`) REFERENCES `title` (`title_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


2. cccb table

DROP TABLE IF EXISTS `cccb`;
CREATE TABLE `cccb` (
`cccb_id` int(5) unsigned zerofill NOT NULL auto_increment,
`cccb_name` varchar(50) default NULL,
`cccb_purpose` varchar(500) default NULL,
`cccb_parent_committee` varchar(60) default NULL,
`cccb_meeting_place` varchar(100) default NULL,
`cccb_meeting_date` varchar(60) default NULL,
`cccb_meeting_time` varchar(18) default NULL,
PRIMARY KEY (`cccb_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

3. member table

DROP TABLE IF EXISTS `member`;
CREATE TABLE `member` (
`member_id` int(4) unsigned zerofill NOT NULL auto_increment,
`member_fname` varchar(14) NOT NULL,
`member_lname` varchar(14) NOT NULL,
`address1` varchar(30) default NULL,
`address2` varchar(30) default NULL,
`city` varchar(30) default NULL,
`state` varchar(30) default NULL,
`zip1` int(5) default NULL,
`zip2` int(4) default NULL,
`areacode` int(3) default NULL,
`phone` int(7) default NULL,
`wards` int(2) default NULL,
PRIMARY KEY (`member_id`),
UNIQUE KEY `member_unique` (`member_fname`,`member_lname`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


// member history id //ds
$opts['fdd']['mh_id'] = array(
'name' => 'mh id',
'select' => 'T',
'options' => 'AVCPDR', // auto increment
'maxlen' => 6,
'default' => '0',
'sort' => true );


// member id //
$opts['fdd']['member_id'] = array(
'name' => 'member id',
'select' => 'D',
'maxlen' => 4,
'values' => array(
'table' => 'member',
'column' => 'member_fname','','member_lname'),
'sort' => true );


// cccb_id //
$opts['fdd']['cccb_id'] = array(
'name' => 'cccb id',
'select' => 'T',
'maxlen' => 5,
'values' => array(
'table' => 'cccb',
'column' => 'cccb_name'), // was 'cccb_id' //
'sort' => true );


// title_id from title table //
$opts['fdd']['title_id'] = array(
'name' => 'title id',
'select' => 'T',
'maxlen' => 5,
'values' => array(
'table' => 'title',
'column' => 'title_name'),
'sort' => true
);

// date_start for member_history table //
$opts['fdd']['date_start'] = array(
'name' => 'date start',
'select' => 'T',
'maxlen' => 10,
'sort' => true
);
$opts['fdd']['date_end'] = array(
'name' => 'date end',
'select' => 'T',
'maxlen' => 10,
'sort' => true
);
$opts['fdd']['term'] = array( 'name' => 'term', 'select' => 'T', 'maxlen' => 4, 'sort'

=> true);// Now important call to phpMyEditrequire_once 'phpMyEdit.class.php';new

phpMyEdit($opts);?></body></html>

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy