I got a dump of the database, I saw in it related tables, here is a screen from phpMyAdmin:
Question: how can I link tables myself, and how can this be used in PHP, because links are made not only for viewing in phpMyAdmin?
Refresh foreign key information . All this is done to normalize the database.
You need to write a SQL query so that your FOREIGN KEY ( category_id
) in one table matches the PRIMARY KEY (apparently, id
) in another. Those.
select * from table_1 t1, table_2 t2 where t1.id = t2.category_id ... ;
Source: https://ru.stackoverflow.com/questions/164236/
All Articles