Pulling data from database for a template

HI guys,

I’m building a booking app and I’ve got issues getting the dynamic data into the template.
I’ve got a “space” template where the “space” details should be loaded from the “space table”. I’ve got all. the details there like space name,city, and so on.

My challenges are:

  1. How do I make sure the right, unique data is pulled for every space.? There will be thousands of spaces so every space will, of course, have its own details.
  2. How can people get to a space from a repeating group? I will have lists of spaces and then when someone clicks on one space, they should arrive at this dynamic page.

I’m very confused, thanks for the help though!