Really sorry about this i just worked out if i dont select the foreign key in an insert statement it will return this error i have to include this into the query, i have also noticed i usually dont add auto inc fields in the insert query but my departments table has a foriegn key join and is returning error unless i add it into the query, is there a way around this ?
> Hi there i am having another issue with key constraints now, i emptied > the tables and made the foreign keys fine although now when i try and > insert a row into the table i get this > > ERROR 1216: Cannot add or update a child row: a foreign key constraint > fails > > What could be the problem ? > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]