I am working on a movie booking/viewing website for a particular archive. There are multiple movies in both same and different formats(vcd,dvd,vhs).There are two tables in the database, one is just for the general information like title, director etc. of the movie and the other table is special for the disk like subtitles, language, number of disks.
I created a div, when showing search results. Only the movie names came as the search result, and there is an expand button near them, when the button is clicked an information div appears on the right of the page showing all information on the movie. But, there is a problem with the multiple movies I mentioned above. I couldn’t manage to do it for multiple movies.
I want the page to show only one title for duplicate movies and when I click on expand button, I want it to show all of the details for all copies for duplicates(may be there could be a dropdown box, and the user selects the format then according to choice, the information is showed)
How can I do this? What will be the database functions and php code for this ?
I am open to all sorts of ideas or pieces of codes
Thanks
formatfield which would be a many-to-many relationship, this would get rid of your duplicates and better normalize your db structure.