No matter how I set up ON UPDATE and ON DELETE when joining tables, it’s all the same when adding data to the table add_photos_store through the admin panel, such an error "
Cannot add or update a row to a foreign key constraint fails (
freeman_domolux.add_photos_store, CONSTRAINTadd_photos_store_ibfk_1FOREIGN KEY (magazin_id)
"I translate this." It is impossible to add or update a child line: the foreign key restriction is not executed. "I did not set a restriction, why such an error? in each store, this is because of the sample. You need to write a sample so select * from add_photos_store where magazin_id = n, where n is the store id, eg magazin_id = id, but this error "Unknown column 'magazin_id' in 'where clause'". What is wrong doing?
select * from add_photos_store where magazin_id=1completes without errors. so that somewhere you are looking at it, maybe phpmyadmin or through what you execute the query connects to some other database - Mike