I am building a module to interact with an existing database, allowing users to access the database content without leaving Drupal. Because of my setup, all viewing and editing is handled by my module and the data is not stored locally in nodes. My last step in development is creating a way for users to search.
What is the best way to handle n:m database relations with own developed modules?
I have two entities (articles and shipping-sizes). Every article contains 1-n "shipping sizes" (like 1 kg, 1 ton, 1 packet). Every entry in the shipping-size database can be used by c:n articles. To stores this setting in a database i decided to make it with an n:m relation:
I am a beginner at wriring Drupal modules (but I do have a reasonable amount of PHP experience), so please bear with me. I'm writing a block module that will display a preview (title and teaser) of a recent piece of content of a specific content type - the type can be configured in the block configuration screen. An example would be a recent news article to be displayed in a sidebar.