New project for a restaurant review website

4 posts by 2 authors in: Forums > CMS Builder
Last Post: October 15, 2019   (RSS)

By daniel - October 9, 2019

Hi Orazio,

Yes, I think this is definitely a valid way to set up this section, and while it's a bit repetitive to set up so many fields, it's fairly simple. There is a way that you could do this without having to duplicate the restaurant+comment fields so many times with a Related Records field, but that is quite a bit more complex. Though if you're interested in learning about it I could give you a general explanation of how it could work.

Thanks,
Daniel

Daniel
PHP Programmer
interactivetools.com

By mbareara - October 13, 2019

Of course! I'm interested! Thank you for sharing your solution!

Orazio

By daniel - October 15, 2019

Hi Orazio,

The general way this would work is to have three tables: restaurants, articles, and reviews (or however you'd like to call it). The "reviews" table would contain records that have restaurant/comment fields, plus a field to reference the article table (the default is "foreignFieldNum"). In the articles table you would then add a "Related Records" field that points to the "reviews" table and uses the reference field you set up previously (e.g. "foreignFieldNum"). With the Related Records field set up, you'll then be able to add as many "review" records for each article as necessary.

The whole process is a bit too involved to explain here in full, but if you do try to implement this and run into any specific issues I'm happy to help sort them out!

Thanks,

Daniel
PHP Programmer
interactivetools.com