-
- 94 Posts
I want to create a dropdown box with instruments in it. These instruments are stored in a table in the database.
Can i add manually a table to the modx database? If yes, how can i make a connection to it and make relation with other tables?
Or else, what is the best way to create a table, and make relations with other (existing) tables in the database?
-
- 24,544 Posts
If the table already exists, it may be easier to just move it into the MODX DB and use this method:
http://bobsguides.com/custom-db-tables.html
You can definitely add it as a table in the MODX DB. If you need to relate it to other MODX tables, however, you'll need to manually edit the schema before generating the class and map files, but you may want to first generate them with it as a standalone table and make sure you can access it with xPDO before setting up the relational stuff.
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html