I got a dump of the database, I saw in it related tables, here is a screen from phpMyAdmin:

alt text

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?

    2 answers 2

    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 ... ;