Hello, everyone!
Well ... My problem is this: I have a MySQL database that has 3 tables (Client, Event, Equipment). The event table has two foreign keys, the first one referencing the id of the Customer table (customer_id) and the second referencing the id of the Equipment table. When inserting values in the Client and Equipment tables everything is OK, but when inserting values in the Event table, referencing a specific id of the other tables, the inserted values also reference the other registered ids.
To be clearer:
An example : I am going to register an event contracted by customer id 1, put all the data in their respective places, including the id number of 1 where the foreign key value . The code is executed, however, when I execute a "Select" to check, the inserted data is also referencing the id 2 client.
"Select" displaying the values entered in the Event table:
This"Select" shows the problem. The value "Saint Anthony" in the "city" column should belong only to the id 1 client.
PS: I'm sorry for any mistake, I'm new here, I've never even participated in question and answer sites. Anyway ... Can you help me? What should I do? Because I'm facing this