Good day, forum users!

I try to create a one-to-many relationship between two tables: Books and Genres. Books contain a genre number, and books of the same genre can be repeated. In the table Genres by genre number you can see its name. Using phpMyAdmin tools, I try to connect a field of a primary auto-incrementing key and a usual numeric field. A pop-up window with a blank page flies out and the link is not established. (((

Please help me, what am I doing wrong? I attach a screenshot with my base, drew the link I want to receive:

alt text

    1 answer 1

    In phpMyAdmin, you need to go into editing the structure of the books table, create a field with type int (11) and follow the link "Links". A form for editing links will appear, with the help of which you can quickly set up the necessary Foreign keys for this table.

    • @bitrixoid, yes, thanks))) And, as I understood, before establishing a connection, those fields that are not primary keys must be made indices. Then get it. - neo