I\'m not sure if MySQL supports triggers, or the syntax...
but here\'s what I\'m trying to do:
when I delect a record from a table, I want to create an entry into another table with information about the item deleted, pulled from 2 tables (including the one where the delete occured): BidInfo and ItemInfo.
So so far I have this:
CREATE TRIGGER trigger AFTER DELETE
ON BidInfo FOR EACH ROW
EXECUTE PROCEDURE ( INSERT INTO BuyInfo SET
ItemID = \'ItemID from BidInfo for deleted row\',
Seller = \'UserID from ItemInfo for ItemID\',
Buyer = \'CurrBidder from BidInfo\',
MaxBid = \'CurrBid from BidInfo for deleted row\');
I really don\'t know how to fill in what\'s in the quotes...all these tables are linked by ItemID, the primary key in each.
Can anyone help??
No replies to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users