Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Baptiste's avatar

How to create 3 different sites using foreign key

Hello everyone, I realized a site with different tables such as:

  • website
  • user
  • equipment
  • peripheral

This site is currently available only for one city or I was asked to create this site for three different cities. Recreating 3 times the same tables does not help me so I will reference my site in each table using a foreign key. But after how can I make to display the desired website according to the foreign key ?

At the level of my code I have nothing to offer you for now because I do not see how to do.

0 likes
0 replies

Please or to participate in this conversation.