Hi everyone ,
I have two tables namely users & roles.
users include users_id(primary key),users_name,users_email,roles_id(foreign key)
roles include roles_id(primary key),roles_name.
Both tables are innodb. I am trying to insert/update data in 'users' table but i am unable to insert/update.
it display follwing error
Cannot add or update a child row: a foreign key constraint fails.
Regards,
Anas Anjaria
I have two tables namely users & roles.
users include users_id(primary key),users_name,users_email,roles_id(foreign key)
roles include roles_id(primary key),roles_name.
Both tables are innodb. I am trying to insert/update data in 'users' table but i am unable to insert/update.
it display follwing error
Cannot add or update a child row: a foreign key constraint fails.
Regards,
Anas Anjaria