i want to display record related to a specific primary key based on the foreign keys in other tables. How to display records for that primary key in other tables using php??
for example:
table1
primary key 1: plate#1
primary key 2: plate#2
primary key 3: plate#3
table2
primary key 1: destination|route|revenue|plate# 1
primary key 2: destination|route|revenue|plate# 3
table3
primary key 1: diesel price|number of liters|plate# 1
primary key 2: diesel price|number of liters|plate# 3
I already created a page that will display all the data in table1
. I want to display the data in table1
and table2
that are related to the data in table1
when I made the database they already had relationship with each other. My problem is just displaying the record related to table1
. I want to display records for just plate#1
, another for plate#2
and so on.