When I run:
DELETE FROM `examplecompname_empdata` WHERE `Emp_ID` = '1'
I get the following error: Unknown column 'examplecompname_empdata.Emp_ID' in 'where clause'.
I have 2 tables examplecompname_empdata and triggertable.
I've already created a delete trigger, when i delete a data in examplecompname_empdata it must delete the same id in triggertable.
But after i click the delete data in my dashboard it says:
Unknown column 'examplecompname_empdata.Emp_ID' in 'where clause'
DELETE FROM `examplecompname_empdata` WHERE `Emp_ID` = '1'
I create the trigger on examplecompname_empdata with this code:
BEGIN
DELETE FROM triggertable
WHERE triggertable.id = examplecompname_empdata.Emp_ID;
END
Why am I getting this error?
table.Emp_IDis a column in thetable. Are you sure you have this column? PHPMyAdmin seems to be telling you that you don't have it, maybe there's a typo