I have an UPDATE trigger on my inventory_transactions table, set to call the spUpdateInventoryCounts procedure for the iInventoryID (FK) record being modified. Here's the code for my update trigger:
DELIMITER $$
DROP TRIGGER /*!50032 IF EXISTS */ sp_IT_Update$$
create trigger sp_IT_Update AFTER UPDATE on inventory_transactions
for each row BEGIN
DECLARE tiKey INT;
SET tiKey = inventory_transactions.iinventoryid;
CALL spUpdateInventoryCounts(tiKey);
END;
$$
DELIMITER ;
...yet when I modify a row in the Inventory_transactions table, I get an error saying "Error No. 1109
Unknown table 'inventory_transactions' in field list"
...but it's the freakin' table itself! The error would appear to be in this code, and not the spUpdateInventoryCounts because I dumbed that one down to simply say "update inventory set iqtyinstock=5" just to remove the possibility of that being the culprit.
Ugh....this should be simple but I'm just missing something....
Your help greatly appreciated!
--Michael
DELIMITER $$
DROP TRIGGER /*!50032 IF EXISTS */ sp_IT_Update$$
create trigger sp_IT_Update AFTER UPDATE on inventory_transactions
for each row BEGIN
DECLARE tiKey INT;
SET tiKey = inventory_transactions.iinventoryid;
CALL spUpdateInventoryCounts(tiKey);
END;
$$
DELIMITER ;
...yet when I modify a row in the Inventory_transactions table, I get an error saying "Error No. 1109
Unknown table 'inventory_transactions' in field list"
...but it's the freakin' table itself! The error would appear to be in this code, and not the spUpdateInventoryCounts because I dumbed that one down to simply say "update inventory set iqtyinstock=5" just to remove the possibility of that being the culprit.
Ugh....this should be simple but I'm just missing something....
Your help greatly appreciated!
--Michael