I have made one-to-many relationship between two modules Ads and Contacts..Made a custom relate field in Ads and placed it in edit view which opens sub panel of contacts.The reason is when creating an Ads user can select multiple contacts.But the issue is I can only select one contact from Ads create screen.How can i achieve this?or is their any other way to do this please guide i have searched a lot to do this but couldn't find anyway.
Current result:
I need it like this:
EmieOmdorff,Tom,Lacy
Related
In SuiteCrm,
I have 'doctor' module, in this module
in 1st module I display doctors info such as name, speciality, experience etc.
in 2nd table, I want to show doctrs location with fields such as address, contact of hospital, state, city.
in 3rd table I have feedback received by doctor from diff.patient.
like this I have multiple tables.
Need multiple tables on list view page and detail view page for custom module created using module builder. Need to know how to add that.
currently only one table is there on custom module.
So you can different modules for doctor and patient and then create appropriate relationship(one-to-one, one-to-many, many-to-many) between them.
All you need to create Seperate modules for different table needs.
1) Doctor -> Person type module, this module comes with Primary address and alternate address widget, which is a group of 5 fields itself.
2) Feedbacks-> a Basic type module.
Until you dont' need M-2-M relationship between Doctor and Location, you should not create a separate module.
Hope this helps.
its my first post here and im a bit worried about if it fits this forum.
Im making a project about a music library online, you signup in the website and you can add songs to your own list, something similar to spotify maybe. But i have some doubts about inserting the songs in the database because i dont want to have a popular song 30 times in the database, one idea i had is to only allow to insert songs in the database to an "admin" and people can see that admin song's list and add from there to their list and if the song you want is not in the list contact the admin but that seems tiring for the user. I guess another good option is that the form to add a song to your list shows you a select where you see existings album/songs and if you cant find it there then you create it in the database, but i need to think more into how to perform that idea.
The database is created with mysql, im pretty sure i will use pdo
database design
Finally i think is a better idea to connect library table with song instead of album so people can have couple songs instead of the whole album and im going to manage the inserts from the website with selects on the form so the user doesnt create already existing content, sorry for the post to that people downvoted it
The other idea you mentioned is a good option.
Say you have three dropdowns one of Artist, second of Album and third of songs. Here you can list all the Artists in the database in the first dropdown. On selecting an artist, the albums related to the artist selected can be populated in the second dropdown. On selecting an album from this dropdown can populate all the songs in that album in the third dropdown. If the user feels that the song he wishes to add is not available in the third dropdown, he can click a button saying 'Suggest an Addition'. Clicking this button, a popup will appear which will have a dropdown of Artists available in the database, and another dropdown of all the albums. Against this selection, he can add a song.
Also, I would suggest that every newly added song be subject to admin approval. This will prevent the duplicate entries of songs. For this, you can have a flag in the songs table which will be set based on admin approving the newly added song.
example:
Select Artist (dropdown 1)
Select Album (dropdown 2)
Select Song (dropdown 3)
Suggest an Addition (button)
I have been relentlessly trying to edit my database relationships but to no avail. Here is the scenario:
i have an inventory table. an inventory can be classified into 2 categories(technical eg. guns, radios and general eg. uniforms). i was hoping there could be a way for me to add details(from different tables eg. technical_inventory_table and general_inventory_table) to the inventory table through the category since the two categories have different fields. is there any way for me to do that? please do note that a technical inventory will be listed individually since a single item will have a serial number attached to it.
or does the answer provided here - https://dba.stackexchange.com/questions/33099/storing-different-products-and-joining-on-table-names - be an already good solution for my problem? i would like to avoid creating a table where it will be made up of what usually are the fieldnames as described in the link to prevent confusion within my team.
thanks for any help in advance
I stucked in a Problem When Playing with Drop Downs.I tried to use this
http://www.grocerycrud.com/forums/topic/1087-updated-24112012-dependent-dropdown-library/
But actually my requirement is quite different. I have a table fwld_products in which i am adding all other table's categories, from
fwld_cat_main (main Category's ID),
fwld_cat_sub1 (sub1 Category's id)
fwld_cat_sub2 (sub2 Category's id)
fwld_cat_sub3 (sub3 Category's id)
I want to Display Dropdown in such a way, when user Selects main
Category, the Drop Down Appear (sub1) Having Data related to main
category and when sub1 selected drop down appear (sub2) showing data
related to sub1, and sub2 selected and drop down appear(sub3) to show
data related to Drop down (sub2).
When submitted Finnally data inserted to [fwld_products].
Here I am attaching ERD, and result as well.
Please help
Hold on, it seems that DB structure of your categories table needs to be improved. What I suggest is that you follow footprints from some of the popular CMS like Opencart. It will give you a great sense to accomplish your task. You can easily optimize your DB by using just one "category" table (instead of main, sub1, sub2, and sub3 category tables) like this:
For category names, description, and meta keywords etc you can create this table "category_description":
Finally to assign categories to the products you can simply create another table "product_to_category":
In this way you can easily manage your data in DB and you can now easily tackle your situation using Codeigniter and Grocerycrud.
Try, Chained Selects Plugin for jQuery and Zepto (Github Project | Project Home)
If you use jquery or zepto in your project, this plugin will help you to solve your problem, Specially the remote version. You can create related select boxes easily.
Hope this helps :)
I currently have 3 sql tables "news" "content" and "users".
What I'm trying to achieve here is a subscribe/follow feature that allows users to follow anything listed inside the "content" table and then receive notifications whenever news is added regarding that content to the "news table". Will I need to link the 2 tables "content" and "news"in some way?. Other than I don't have any ideas at the moment. Any help will be really appreciated!
Use a TRIGGER on the news table. The trigger action will perform a JOIN to find the users who are following the related content.