I've been struggling to get a working version of Dadabik installed that allows you to select multiple values from a foreign table. I had some success with someone's patch that does this, but so far I can only get it to insert the labels for the field I want and not the id. I want the interface to show state names in the editing form, in this instance, but to insert the ID for the state name. For some reason, the Dadabik folks took the ability to select multiple values from a foreign table out of Dadabik after version 2. No idea why.
Then I found in the phpMyAdmin documentation some information about using $cfg['Servers'][$i]['relation'] and $cfg['Servers'][$i]['pmadb'] to set up foreign table relationships. This looked promising, but only allows for single value selection and only shows the ID of the foreign key for selection and not the values in another field of the foreign table. Not very useful from the data entry user's point of view.
So I'm casting about wildly for a tool that allows me to do this so I don't have to spend time trying to do it in Adodb or ezsql. Sigh. Any suggestions?
----
Incidentally, if you're wanting single value selection from a foreign table, Dadabik does it well. If you want to do it phpMyAdmin, you'll need this process and table structure for creating the relations table, which I snarfed from php-myadmin-users archive.
* set up a PMA database as described in docs
* within this database create a table following this scheme:
CREATE TABLE `PMA_relation` (
`master_db` varchar(64) NOT NULL default "",
`master_table` varchar(64) NOT NULL default "",
`master_field` varchar(64) NOT NULL default "",
`foreign_db` varchar(64) NOT NULL default "",
`foreign_table` varchar(64) NOT NULL default "",
`foreign_field` varchar(64) NOT NULL default "",
PRIMARY KEY (`master_db`, `master_table`, `master_field`),
KEY foreign_field (foreign_db, foreign_table)
) TYPE=MyISAM COMMENT="Relation table";
* put the relation table name in $cfg["Servers"][$i]["relation"]
* now as normal user open phpMyAdmin and for each table where you want
to use this feature, click "Structure/Relation view/" and choose foreign
fields.
Comments
11/16/06 @ 22:11
Thanks for the suggestion. I couldn't find this answer a year and half ago when I was helping someone else with the problem, but it's good to know about it now.
Post new comment